diff --git a/chain/sync_test.go b/chain/sync_test.go index 20d3558..14993f5 100644 --- a/chain/sync_test.go +++ b/chain/sync_test.go @@ -738,6 +738,10 @@ func TestSync_Bad_InvalidBlockBlob(t *testing.T) { func TestSync_Bad_PreHardforkFreeze(t *testing.T) { genesisBlob, genesisHash := makeGenesisBlockBlob() + genesisBytes, err := hex.DecodeString(genesisBlob) + if err != nil { + t.Fatalf("decode genesis blob: %v", err) + } regularTx := types.Transaction{ Version: 1, @@ -800,11 +804,11 @@ func TestSync_Bad_PreHardforkFreeze(t *testing.T) { }, } - if err := c.processBlockBlobs(genesisBlob, nil, 0, 1, opts); err != nil { + if err := c.processBlockBlobs(genesisBytes, nil, 0, 1, opts); err != nil { t.Fatalf("process genesis: %v", err) } - err := c.processBlockBlobs(block1Blob, [][]byte{regularTxBlob}, 1, 100, opts) + err = c.processBlockBlobs(block1Blob, [][]byte{regularTxBlob}, 1, 100, opts) if err == nil { t.Fatal("expected freeze rejection, got nil") } diff --git a/consensus/verify_crypto_test.go b/consensus/verify_crypto_test.go index 47e3f5d..255c924 100644 --- a/consensus/verify_crypto_test.go +++ b/consensus/verify_crypto_test.go @@ -48,7 +48,7 @@ func TestVerifyV1Signatures_Good_MockRing(t *testing.T) { tx.Signatures = [][]types.Signature{make([]types.Signature, 1)} tx.Signatures[0][0] = types.Signature(sigs[0]) - getRing := func(amount uint64, offsets []uint64) ([]types.PublicKey, error) { + getRing := func(height, amount uint64, offsets []uint64) ([]types.PublicKey, error) { return []types.PublicKey{types.PublicKey(pub)}, nil } @@ -82,7 +82,7 @@ func TestVerifyV1Signatures_Bad_WrongSig(t *testing.T) { }, } - getRing := func(amount uint64, offsets []uint64) ([]types.PublicKey, error) { + getRing := func(height, amount uint64, offsets []uint64) ([]types.PublicKey, error) { return []types.PublicKey{types.PublicKey(pub)}, nil }