From 68ebafa0627eda7318d298e9b1a5c12d4f337f4e Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Fri, 5 Jul 2024 11:58:32 +0100 Subject: [PATCH] fix tests --- go/enclave/components/consumer_test.go | 2 +- go/host/storage/hostdb/rollup_test.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go/enclave/components/consumer_test.go b/go/enclave/components/consumer_test.go index dc99fbc7f5..34b3032705 100644 --- a/go/enclave/components/consumer_test.go +++ b/go/enclave/components/consumer_test.go @@ -25,7 +25,7 @@ func TestInvalidBlocksAreRejected(t *testing.T) { for _, header := range invalidHeaders { loopHeader := header - _, err := blockConsumer.ingestBlock(context.Background(), types.NewBlock(&loopHeader, nil, nil, nil, &trie.StackTrie{})) + _, err := blockConsumer.ingestBlock(context.Background(), types.NewBlock(&loopHeader, nil, nil, &trie.StackTrie{})) if err == nil { t.Errorf("expected block with invalid header to be rejected but was accepted") } diff --git a/go/host/storage/hostdb/rollup_test.go b/go/host/storage/hostdb/rollup_test.go index b5320c6139..886496abd7 100644 --- a/go/host/storage/hostdb/rollup_test.go +++ b/go/host/storage/hostdb/rollup_test.go @@ -20,7 +20,7 @@ func TestCanStoreAndRetrieveRollup(t *testing.T) { metadata := createRollupMetadata(batchNumber - 10) rollup := createRollup(batchNumber) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err = AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil { @@ -60,7 +60,7 @@ func TestGetRollupByBlockHash(t *testing.T) { metadata := createRollupMetadata(batchNumber - 10) rollup := createRollup(batchNumber) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err = AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil { @@ -92,7 +92,7 @@ func TestGetLatestRollup(t *testing.T) { rollup1LastSeq := int64(batchNumber) metadata1 := createRollupMetadata(rollup1FirstSeq) rollup1 := createRollup(rollup1LastSeq) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err = AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil { @@ -137,7 +137,7 @@ func TestGetRollupBySeqNo(t *testing.T) { rollup1LastSeq := int64(batchNumber) metadata1 := createRollupMetadata(rollup1FirstSeq) rollup1 := createRollup(rollup1LastSeq) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err = AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil { @@ -192,7 +192,7 @@ func TestGetRollupListing(t *testing.T) { rollup1LastSeq := int64(batchNumber) metadata1 := createRollupMetadata(rollup1FirstSeq) rollup1 := createRollup(rollup1LastSeq) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err = AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil { @@ -295,7 +295,7 @@ func TestGetRollupByHash(t *testing.T) { rollup1LastSeq := int64(batchNumber) metadata1 := createRollupMetadata(rollup1FirstSeq) rollup1 := createRollup(rollup1LastSeq) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err = AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil { @@ -336,7 +336,7 @@ func TestGetRollupBatches(t *testing.T) { db, _ := createSQLiteDB(t) txHashesOne := []common.L2TxHash{gethcommon.BytesToHash([]byte("magicStringOne")), gethcommon.BytesToHash([]byte("magicStringTwo"))} batchOne := createBatch(batchNumber, txHashesOne) - block := types.NewBlock(&types.Header{}, nil, nil, nil, nil) + block := types.NewBlock(&types.Header{}, nil, nil, nil) dbtx, _ := db.NewDBTransaction() err := AddBlock(dbtx, db.GetSQLStatement(), block.Header()) if err != nil {