Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rianhughes committed Oct 22, 2024
1 parent 2501c70 commit 8ebd0b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func processBlocks(txn db.Transaction, processBlock func(uint64, *sync.Mutex) er
}
blockNumbers := make(chan uint64, 1024) //nolint:mnd
go func() {
for bNumber := range chainHeight {
for bNumber := range chainHeight + 1 {
blockNumbers <- bNumber
}
close(blockNumbers)
Expand All @@ -467,15 +467,6 @@ func processBlocks(txn db.Transaction, processBlock func(uint64, *sync.Mutex) er
})
}
return workerPool.Wait()
// This causes the transaction to be discarded
// err = workerPool.Wait()
// if err != nil {
// return err
// }
// txnLock.Lock()
// err = txn.Commit()
// txnLock.Unlock()
// return err
}

// calculateBlockCommitments calculates the txn and event commitments for each block and stores them separately
Expand Down
2 changes: 1 addition & 1 deletion migration/migration_pkg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func TestL1HandlerTxns(t *testing.T) {

// Ensure the key has been deleted
_, err := chain.L1HandlerTxnHash(&msgHash)
require.Error(t, err)
require.ErrorIs(t, err, db.ErrKeyNotFound)

// Recalculate and store the L1 message hashes
require.NoError(t, testdb.Update(func(txn db.Transaction) error {
Expand Down

0 comments on commit 8ebd0b7

Please sign in to comment.