test(core): align helpers with current APIs
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
0512861330
commit
8802b94ee5
2 changed files with 8 additions and 4 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue