Skip to content

Commit

Permalink
chg: fix assertions in test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Sep 10, 2024
1 parent 18c7226 commit fc319f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/state/statedb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"testing/quick"

"github.com/stretchr/testify/assert"
"github.com/holiman/uint256"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/blockstm"
Expand All @@ -47,7 +48,6 @@ import (
"github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/triedb/hashdb"
"github.com/ethereum/go-ethereum/triedb/pathdb"
"github.com/holiman/uint256"
)

// Tests that updating a state trie does not leak any database writes prior to
Expand Down Expand Up @@ -1242,15 +1242,15 @@ func TestMVHashMapRevertConcurrent(t *testing.T) {

// Balance after executing Tx0 should be 0 because it shouldn't be affected by Tx1 or Tx2
b := states[0].GetBalance(addr)
assert.Equal(t, common.Big0, b)
assert.Equal(t, uint256.MustFromBig(common.Big0), b)

// Balance after executing Tx1 should be 0 because Tx1 got reverted
b = states[1].GetBalance(addr)
assert.Equal(t, common.Big0, b)
assert.Equal(t, uint256.MustFromBig(common.Big0), b)

// Balance after executing Tx2 should be 100 because its snapshot is taken before Tx1 got reverted
b = states[2].GetBalance(addr)
assert.Equal(t, balance, b)
assert.Equal(t, uint256.MustFromBig(balance), b)
}

// TestCopyOfCopy tests that modified objects are carried over to the copy, and the copy of the copy.
Expand Down

0 comments on commit fc319f7

Please sign in to comment.