From fc319f7bcb74436f8e599a0f640ec83fb996bcb2 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Tue, 10 Sep 2024 17:50:34 +0200 Subject: [PATCH] chg: fix assertions in test --- core/state/statedb_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 0064b35cad..424eab86c4 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -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" @@ -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 @@ -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.