Skip to content

Commit

Permalink
revert changes to transaction_conditional_test
Browse files Browse the repository at this point in the history
they were mainly to address vscode warnings, will move it
to a separate PR
  • Loading branch information
Vinod Damle committed Nov 8, 2024
1 parent e6b772a commit 57322f7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions core/types/transaction_conditional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ func TestTransactionConditionalCost(t *testing.T) {
{
name: "default cost per account",
cond: TransactionConditional{KnownAccounts: map[common.Address]KnownAccount{
{19: 1}: {},
{19: 2}: {},
common.Address{19: 1}: KnownAccount{},
common.Address{19: 2}: KnownAccount{},
}},
cost: 2,
},
{
name: "storage root lookup",
cond: TransactionConditional{KnownAccounts: map[common.Address]KnownAccount{
{19: 1}: {
common.Address{19: 1}: KnownAccount{
StorageRoot: &EmptyRootHash,
}}},
cost: 2,
},
{
name: "cost per storage slot lookup",
cond: TransactionConditional{KnownAccounts: map[common.Address]KnownAccount{
{19: 1}: {
common.Address{19: 1}: KnownAccount{
StorageSlots: map[common.Hash]common.Hash{
{}: {31: 1},
{31: 1}: {31: 1},
common.Hash{}: common.Hash{31: 1},
common.Hash{31: 1}: common.Hash{31: 1},
},
}}},
cost: 3,
Expand All @@ -67,11 +67,11 @@ func TestTransactionConditionalCost(t *testing.T) {
BlockNumberMin: big.NewInt(1),
TimestampMin: uint64Ptr(1),
KnownAccounts: map[common.Address]KnownAccount{
{19: 1}: {StorageRoot: &EmptyRootHash},
{19: 2}: {
common.Address{19: 1}: KnownAccount{StorageRoot: &EmptyRootHash},
common.Address{19: 2}: KnownAccount{
StorageSlots: map[common.Hash]common.Hash{
{}: {31: 1},
{31: 1}: {31: 1},
common.Hash{}: common.Hash{31: 1},
common.Hash{31: 1}: common.Hash{31: 1},
},
}}},
cost: 7,
Expand Down Expand Up @@ -158,7 +158,7 @@ func TestTransactionConditionalSerDeser(t *testing.T) {
mustFail: false,
expected: TransactionConditional{
KnownAccounts: map[common.Address]KnownAccount{
common.HexToAddress("0x6b3A8798E5Fb9fC5603F3aB5eA2e8136694e55d0"): {
common.HexToAddress("0x6b3A8798E5Fb9fC5603F3aB5eA2e8136694e55d0"): KnownAccount{
StorageRoot: hashPtr(common.HexToHash("0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563")),
StorageSlots: make(map[common.Hash]common.Hash),
},
Expand All @@ -171,7 +171,7 @@ func TestTransactionConditionalSerDeser(t *testing.T) {
mustFail: false,
expected: TransactionConditional{
KnownAccounts: map[common.Address]KnownAccount{
common.HexToAddress("0x6b3A8798E5Fb9fC5603F3aB5eA2e8136694e55d0"): {
common.HexToAddress("0x6b3A8798E5Fb9fC5603F3aB5eA2e8136694e55d0"): KnownAccount{
StorageRoot: nil,
StorageSlots: map[common.Hash]common.Hash{
common.HexToHash("0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"): common.HexToHash("0x"),
Expand Down

0 comments on commit 57322f7

Please sign in to comment.