Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions accounts/abi/bind/v2/dep_tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func TestContractLinking(t *testing.T) {
},
},
// test two contracts can be deployed which don't share deps
linkTestCaseInput{
{
map[rune][]rune{
'a': {'b', 'c', 'd', 'e'},
'f': {'g', 'h', 'i', 'j'}},
Expand All @@ -296,7 +296,7 @@ func TestContractLinking(t *testing.T) {
},
},
// test two contracts can be deployed which share deps
linkTestCaseInput{
{
map[rune][]rune{
'a': {'b', 'c', 'd', 'e'},
'f': {'g', 'c', 'd', 'h'}},
Expand All @@ -306,31 +306,31 @@ func TestContractLinking(t *testing.T) {
},
},
// test one contract with overrides for all lib deps
linkTestCaseInput{
{
map[rune][]rune{
'a': {'b', 'c', 'd', 'e'}},
map[rune]struct{}{'b': {}, 'c': {}, 'd': {}, 'e': {}},
map[rune]struct{}{
'a': {}},
},
// test one contract with overrides for some lib deps
linkTestCaseInput{
{
map[rune][]rune{
'a': {'b', 'c'}},
map[rune]struct{}{'b': {}, 'c': {}},
map[rune]struct{}{
'a': {}},
},
// test deployment of a contract with overrides
linkTestCaseInput{
{
map[rune][]rune{
'a': {}},
map[rune]struct{}{'a': {}},
map[rune]struct{}{},
},
// two contracts ('a' and 'f') share some dependencies. contract 'a' is marked as an override. expect that any of
// its depdencies that aren't shared with 'f' are not deployed.
linkTestCaseInput{map[rune][]rune{
{map[rune][]rune{
'a': {'b', 'c', 'd', 'e'},
'f': {'g', 'c', 'd', 'h'}},
map[rune]struct{}{'a': {}},
Expand Down
4 changes: 2 additions & 2 deletions internal/ethapi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ func TestCall(t *testing.T) {
Balance: big.NewInt(params.Ether),
Nonce: 1,
Storage: map[common.Hash]common.Hash{
common.Hash{}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"),
{}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"),
},
},
},
Expand Down Expand Up @@ -3796,7 +3796,7 @@ func TestCreateAccessListWithStateOverrides(t *testing.T) {
Balance: (*hexutil.Big)(big.NewInt(1000000000000000000)),
Nonce: &nonce,
State: map[common.Hash]common.Hash{
common.Hash{}: common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000002a"),
{}: common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000002a"),
},
},
}
Expand Down
10 changes: 5 additions & 5 deletions trie/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,23 +1011,23 @@ func TestRangeProofErrors(t *testing.T) {
}
// Non-increasing paths
_, err = VerifyRangeProof((common.Hash{}), []byte{},
[][]byte{[]byte{2, 1}, []byte{2, 1}}, make([][]byte, 2), nil)
[][]byte{{2, 1}, {2, 1}}, make([][]byte, 2), nil)
if have, want := err.Error(), "range is not monotonically increasing"; have != want {
t.Fatalf("wrong error, have %q, want %q", err.Error(), want)
}
// A prefixed path is never motivated. Inserting the second element will
// require rewriting/overwriting the previous value-node, thus can only
// happen if the data is corrupt.
_, err = VerifyRangeProof((common.Hash{}), []byte{},
[][]byte{[]byte{2, 1}, []byte{2, 1, 2}},
[][]byte{[]byte{1}, []byte{1}}, nil)
[][]byte{{2, 1}, {2, 1, 2}},
[][]byte{{1}, {1}}, nil)
if have, want := err.Error(), "range contains path prefixes"; have != want {
t.Fatalf("wrong error, have %q, want %q", err.Error(), want)
}
// Empty values (deletions)
_, err = VerifyRangeProof((common.Hash{}), []byte{},
[][]byte{[]byte{2, 1}, []byte{2, 2}},
[][]byte{[]byte{1}, []byte{}}, nil)
[][]byte{{2, 1}, {2, 2}},
[][]byte{{1}, {}}, nil)
if have, want := err.Error(), "range contains deletion"; have != want {
t.Fatalf("wrong error, have %q, want %q", err.Error(), want)
}
Expand Down
Loading
Loading