MCPcopy Create free account
hub / github.com/chain/Core / TestNoncelessIssuance

Function TestNoncelessIssuance

protocol/validation/validation_test.go:365–375  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

363}
364
365func TestNoncelessIssuance(t *testing.T) {
366 tx := bctest.NewIssuanceTx(t, bc.EmptyStringHash, func(tx *legacy.Tx) {
367 // Remove the issuance nonce.
368 tx.Inputs[0].TypedInput.(*legacy.IssuanceInput).Nonce = nil
369 })
370
371 err := ValidateTx(legacy.MapTx(&tx.TxData), bc.EmptyStringHash)
372 if errors.Root(err) != bc.ErrMissingEntry {
373 t.Fatalf("got %s, want %s", err, bc.ErrMissingEntry)
374 }
375}
376
377func TestBlockHeaderValid(t *testing.T) {
378 base := bc.NewBlockHeader(1, 1, &bc.Hash{}, 1, &bc.Hash{}, &bc.Hash{}, nil)

Callers

nothing calls this directly

Calls 1

ValidateTxFunction · 0.85

Tested by

no test coverage detected