ethclient: improve documentation comments

This commit is contained in:
Tinu280 2025-11-16 20:13:21 +07:00
parent 4a3be172d6
commit d34c41f6f1
15 changed files with 106 additions and 83 deletions

View file

@ -286,7 +286,7 @@ func TestContractLinking(t *testing.T) {
}, },
}, },
// test two contracts can be deployed which don't share deps // test two contracts can be deployed which don't share deps
linkTestCaseInput{ {
map[rune][]rune{ map[rune][]rune{
'a': {'b', 'c', 'd', 'e'}, 'a': {'b', 'c', 'd', 'e'},
'f': {'g', 'h', 'i', 'j'}}, 'f': {'g', 'h', 'i', 'j'}},
@ -296,7 +296,7 @@ func TestContractLinking(t *testing.T) {
}, },
}, },
// test two contracts can be deployed which share deps // test two contracts can be deployed which share deps
linkTestCaseInput{ {
map[rune][]rune{ map[rune][]rune{
'a': {'b', 'c', 'd', 'e'}, 'a': {'b', 'c', 'd', 'e'},
'f': {'g', 'c', 'd', 'h'}}, 'f': {'g', 'c', 'd', 'h'}},
@ -306,7 +306,7 @@ func TestContractLinking(t *testing.T) {
}, },
}, },
// test one contract with overrides for all lib deps // test one contract with overrides for all lib deps
linkTestCaseInput{ {
map[rune][]rune{ map[rune][]rune{
'a': {'b', 'c', 'd', 'e'}}, 'a': {'b', 'c', 'd', 'e'}},
map[rune]struct{}{'b': {}, 'c': {}, 'd': {}, 'e': {}}, map[rune]struct{}{'b': {}, 'c': {}, 'd': {}, 'e': {}},
@ -314,7 +314,7 @@ func TestContractLinking(t *testing.T) {
'a': {}}, 'a': {}},
}, },
// test one contract with overrides for some lib deps // test one contract with overrides for some lib deps
linkTestCaseInput{ {
map[rune][]rune{ map[rune][]rune{
'a': {'b', 'c'}}, 'a': {'b', 'c'}},
map[rune]struct{}{'b': {}, 'c': {}}, map[rune]struct{}{'b': {}, 'c': {}},
@ -322,7 +322,7 @@ func TestContractLinking(t *testing.T) {
'a': {}}, 'a': {}},
}, },
// test deployment of a contract with overrides // test deployment of a contract with overrides
linkTestCaseInput{ {
map[rune][]rune{ map[rune][]rune{
'a': {}}, 'a': {}},
map[rune]struct{}{'a': {}}, map[rune]struct{}{'a': {}},
@ -330,7 +330,7 @@ func TestContractLinking(t *testing.T) {
}, },
// two contracts ('a' and 'f') share some dependencies. contract 'a' is marked as an override. expect that any of // 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. // its depdencies that aren't shared with 'f' are not deployed.
linkTestCaseInput{map[rune][]rune{ {map[rune][]rune{
'a': {'b', 'c', 'd', 'e'}, 'a': {'b', 'c', 'd', 'e'},
'f': {'g', 'c', 'd', 'h'}}, 'f': {'g', 'c', 'd', 'h'}},
map[rune]struct{}{'a': {}}, map[rune]struct{}{'a': {}},

View file

@ -11,10 +11,11 @@
package trezor package trezor
import ( import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
const ( const (

View file

@ -11,10 +11,11 @@
package trezor package trezor
import ( import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
const ( const (

View file

@ -11,10 +11,11 @@
package trezor package trezor
import ( import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
const ( const (

View file

@ -11,11 +11,12 @@
package trezor package trezor
import ( import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb" descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
) )
const ( const (

View file

@ -343,7 +343,7 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (
} }
ld = append(ld, "-extldflags", "'"+strings.Join(extld, " ")+"'") ld = append(ld, "-extldflags", "'"+strings.Join(extld, " ")+"'")
} }
// TODO(gballet): revisit after the input api has been defined // TODO(gballet): revisit after the input api has been defined
if runtime.GOARCH == "wasm" { if runtime.GOARCH == "wasm" {
ld = append(ld, "-gcflags=all=-d=softfloat") ld = append(ld, "-gcflags=all=-d=softfloat")
} }

View file

@ -2,8 +2,11 @@
package bal package bal
import "github.com/ethereum/go-ethereum/rlp" import (
import "io" "io"
"github.com/ethereum/go-ethereum/rlp"
)
func (obj *BlockAccessList) EncodeRLP(_w io.Writer) error { func (obj *BlockAccessList) EncodeRLP(_w io.Writer) error {
w := rlp.NewEncoderBuffer(_w) w := rlp.NewEncoderBuffer(_w)

View file

@ -2,8 +2,11 @@
package types package types
import "github.com/ethereum/go-ethereum/rlp" import (
import "io" "io"
"github.com/ethereum/go-ethereum/rlp"
)
func (obj *StateAccount) EncodeRLP(_w io.Writer) error { func (obj *StateAccount) EncodeRLP(_w io.Writer) error {
w := rlp.NewEncoderBuffer(_w) w := rlp.NewEncoderBuffer(_w)

View file

@ -2,8 +2,11 @@
package types package types
import "github.com/ethereum/go-ethereum/rlp" import (
import "io" "io"
"github.com/ethereum/go-ethereum/rlp"
)
func (obj *Header) EncodeRLP(_w io.Writer) error { func (obj *Header) EncodeRLP(_w io.Writer) error {
w := rlp.NewEncoderBuffer(_w) w := rlp.NewEncoderBuffer(_w)

View file

@ -2,8 +2,11 @@
package types package types
import "github.com/ethereum/go-ethereum/rlp" import (
import "io" "io"
"github.com/ethereum/go-ethereum/rlp"
)
func (obj *Log) EncodeRLP(_w io.Writer) error { func (obj *Log) EncodeRLP(_w io.Writer) error {
w := rlp.NewEncoderBuffer(_w) w := rlp.NewEncoderBuffer(_w)

View file

@ -2,8 +2,11 @@
package types package types
import "github.com/ethereum/go-ethereum/rlp" import (
import "io" "io"
"github.com/ethereum/go-ethereum/rlp"
)
func (obj *Withdrawal) EncodeRLP(_w io.Writer) error { func (obj *Withdrawal) EncodeRLP(_w io.Writer) error {
w := rlp.NewEncoderBuffer(_w) w := rlp.NewEncoderBuffer(_w)

View file

@ -948,3 +948,7 @@ func (ec *Client) SimulateV1(ctx context.Context, opts SimulateOptions, blockNrO
err := ec.c.CallContext(ctx, &result, "eth_simulateV1", opts, blockNrOrHash) err := ec.c.CallContext(ctx, &result, "eth_simulateV1", opts, blockNrOrHash)
return result, err return result, err
} }
// Client provides access to the Ethereum JSON-RPC endpoints.
// It wraps lower-level RPC calls and offers convenient methods for
// interacting with Ethereum nodes.

View file

@ -1008,7 +1008,7 @@ func TestCall(t *testing.T) {
Balance: big.NewInt(params.Ether), Balance: big.NewInt(params.Ether),
Nonce: 1, Nonce: 1,
Storage: map[common.Hash]common.Hash{ Storage: map[common.Hash]common.Hash{
common.Hash{}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"), {}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"),
}, },
}, },
}, },
@ -3785,7 +3785,7 @@ func TestCreateAccessListWithStateOverrides(t *testing.T) {
Balance: (*hexutil.Big)(big.NewInt(1000000000000000000)), Balance: (*hexutil.Big)(big.NewInt(1000000000000000000)),
Nonce: &nonce, Nonce: &nonce,
State: map[common.Hash]common.Hash{ State: map[common.Hash]common.Hash{
common.Hash{}: common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000002a"), {}: common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000002a"),
}, },
}, },
} }

View file

@ -1011,7 +1011,7 @@ func TestRangeProofErrors(t *testing.T) {
} }
// Non-increasing paths // Non-increasing paths
_, err = VerifyRangeProof((common.Hash{}), []byte{}, _, 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 { if have, want := err.Error(), "range is not monotonically increasing"; have != want {
t.Fatalf("wrong error, have %q, want %q", err.Error(), want) t.Fatalf("wrong error, have %q, want %q", err.Error(), want)
} }
@ -1019,15 +1019,15 @@ func TestRangeProofErrors(t *testing.T) {
// require rewriting/overwriting the previous value-node, thus can only // require rewriting/overwriting the previous value-node, thus can only
// happen if the data is corrupt. // happen if the data is corrupt.
_, err = VerifyRangeProof((common.Hash{}), []byte{}, _, err = VerifyRangeProof((common.Hash{}), []byte{},
[][]byte{[]byte{2, 1}, []byte{2, 1, 2}}, [][]byte{{2, 1}, {2, 1, 2}},
[][]byte{[]byte{1}, []byte{1}}, nil) [][]byte{{1}, {1}}, nil)
if have, want := err.Error(), "range contains path prefixes"; have != want { if have, want := err.Error(), "range contains path prefixes"; have != want {
t.Fatalf("wrong error, have %q, want %q", err.Error(), want) t.Fatalf("wrong error, have %q, want %q", err.Error(), want)
} }
// Empty values (deletions) // Empty values (deletions)
_, err = VerifyRangeProof((common.Hash{}), []byte{}, _, err = VerifyRangeProof((common.Hash{}), []byte{},
[][]byte{[]byte{2, 1}, []byte{2, 2}}, [][]byte{{2, 1}, {2, 2}},
[][]byte{[]byte{1}, []byte{}}, nil) [][]byte{{1}, {}}, nil)
if have, want := err.Error(), "range contains deletion"; have != want { if have, want := err.Error(), "range contains deletion"; have != want {
t.Fatalf("wrong error, have %q, want %q", err.Error(), want) t.Fatalf("wrong error, have %q, want %q", err.Error(), want)
} }

View file

@ -55,9 +55,9 @@ func TestLayerCap(t *testing.T) {
layers: 2, layers: 2,
base: common.Hash{0x2}, base: common.Hash{0x2},
snapshot: map[common.Hash]struct{}{ snapshot: map[common.Hash]struct{}{
common.Hash{0x2}: {}, {0x2}: {},
common.Hash{0x3}: {}, {0x3}: {},
common.Hash{0x4}: {}, {0x4}: {},
}, },
}, },
{ {
@ -76,8 +76,8 @@ func TestLayerCap(t *testing.T) {
layers: 1, layers: 1,
base: common.Hash{0x3}, base: common.Hash{0x3},
snapshot: map[common.Hash]struct{}{ snapshot: map[common.Hash]struct{}{
common.Hash{0x3}: {}, {0x3}: {},
common.Hash{0x4}: {}, {0x4}: {},
}, },
}, },
{ {
@ -96,7 +96,7 @@ func TestLayerCap(t *testing.T) {
layers: 0, layers: 0,
base: common.Hash{0x4}, base: common.Hash{0x4},
snapshot: map[common.Hash]struct{}{ snapshot: map[common.Hash]struct{}{
common.Hash{0x4}: {}, {0x4}: {},
}, },
}, },
{ {
@ -119,9 +119,9 @@ func TestLayerCap(t *testing.T) {
layers: 2, layers: 2,
base: common.Hash{0x2a}, base: common.Hash{0x2a},
snapshot: map[common.Hash]struct{}{ snapshot: map[common.Hash]struct{}{
common.Hash{0x4a}: {}, {0x4a}: {},
common.Hash{0x3a}: {}, {0x3a}: {},
common.Hash{0x2a}: {}, {0x2a}: {},
}, },
}, },
{ {
@ -144,8 +144,8 @@ func TestLayerCap(t *testing.T) {
layers: 1, layers: 1,
base: common.Hash{0x3a}, base: common.Hash{0x3a},
snapshot: map[common.Hash]struct{}{ snapshot: map[common.Hash]struct{}{
common.Hash{0x4a}: {}, {0x4a}: {},
common.Hash{0x3a}: {}, {0x3a}: {},
}, },
}, },
{ {
@ -168,11 +168,11 @@ func TestLayerCap(t *testing.T) {
layers: 2, layers: 2,
base: common.Hash{0x2}, base: common.Hash{0x2},
snapshot: map[common.Hash]struct{}{ snapshot: map[common.Hash]struct{}{
common.Hash{0x4a}: {}, {0x4a}: {},
common.Hash{0x3a}: {}, {0x3a}: {},
common.Hash{0x4b}: {}, {0x4b}: {},
common.Hash{0x3b}: {}, {0x3b}: {},
common.Hash{0x2}: {}, {0x2}: {},
}, },
}, },
} }
@ -261,7 +261,7 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2}: {}, common.Hash{0x2}: {},
}, },
}, },
@ -271,11 +271,11 @@ func TestDescendant(t *testing.T) {
tr.add(common.Hash{0x3}, common.Hash{0x2}, 2, NewNodeSetWithOrigin(nil, nil), NewStateSetWithOrigin(nil, nil, nil, nil, false)) tr.add(common.Hash{0x3}, common.Hash{0x2}, 2, NewNodeSetWithOrigin(nil, nil), NewStateSetWithOrigin(nil, nil, nil, nil, false))
}, },
snapshotB: map[common.Hash]map[common.Hash]struct{}{ snapshotB: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2}: {}, common.Hash{0x2}: {},
common.Hash{0x3}: {}, common.Hash{0x3}: {},
}, },
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3}: {}, common.Hash{0x3}: {},
}, },
}, },
@ -291,16 +291,16 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2}: {}, common.Hash{0x2}: {},
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x3}: { {0x3}: {
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
}, },
@ -310,11 +310,11 @@ func TestDescendant(t *testing.T) {
tr.cap(common.Hash{0x4}, 2) tr.cap(common.Hash{0x4}, 2)
}, },
snapshotB: map[common.Hash]map[common.Hash]struct{}{ snapshotB: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x3}: { {0x3}: {
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
}, },
@ -330,16 +330,16 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2}: {}, common.Hash{0x2}: {},
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x3}: { {0x3}: {
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
}, },
@ -349,7 +349,7 @@ func TestDescendant(t *testing.T) {
tr.cap(common.Hash{0x4}, 1) tr.cap(common.Hash{0x4}, 1)
}, },
snapshotB: map[common.Hash]map[common.Hash]struct{}{ snapshotB: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x3}: { {0x3}: {
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
}, },
@ -365,16 +365,16 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2}: {}, common.Hash{0x2}: {},
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3}: {}, common.Hash{0x3}: {},
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
common.Hash{0x3}: { {0x3}: {
common.Hash{0x4}: {}, common.Hash{0x4}: {},
}, },
}, },
@ -400,7 +400,7 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2a}: {}, common.Hash{0x2a}: {},
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
@ -408,18 +408,18 @@ func TestDescendant(t *testing.T) {
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x2a}: { {0x2a}: {
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x3a}: { {0x3a}: {
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x2b}: { {0x2b}: {
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x3b}: { {0x3b}: {
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
}, },
@ -429,11 +429,11 @@ func TestDescendant(t *testing.T) {
tr.cap(common.Hash{0x4a}, 2) tr.cap(common.Hash{0x4a}, 2)
}, },
snapshotB: map[common.Hash]map[common.Hash]struct{}{ snapshotB: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x2a}: { {0x2a}: {
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x3a}: { {0x3a}: {
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
}, },
@ -453,7 +453,7 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2a}: {}, common.Hash{0x2a}: {},
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
@ -461,18 +461,18 @@ func TestDescendant(t *testing.T) {
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x2a}: { {0x2a}: {
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x3a}: { {0x3a}: {
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x2b}: { {0x2b}: {
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x3b}: { {0x3b}: {
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
}, },
@ -482,7 +482,7 @@ func TestDescendant(t *testing.T) {
tr.cap(common.Hash{0x4a}, 1) tr.cap(common.Hash{0x4a}, 1)
}, },
snapshotB: map[common.Hash]map[common.Hash]struct{}{ snapshotB: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x3a}: { {0x3a}: {
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
}, },
@ -501,23 +501,23 @@ func TestDescendant(t *testing.T) {
return tr return tr
}, },
snapshotA: map[common.Hash]map[common.Hash]struct{}{ snapshotA: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x1}: { {0x1}: {
common.Hash{0x2}: {}, common.Hash{0x2}: {},
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x3a}: { {0x3a}: {
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x3b}: { {0x3b}: {
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
}, },
@ -528,16 +528,16 @@ func TestDescendant(t *testing.T) {
tr.cap(common.Hash{0x4a}, 2) tr.cap(common.Hash{0x4a}, 2)
}, },
snapshotB: map[common.Hash]map[common.Hash]struct{}{ snapshotB: map[common.Hash]map[common.Hash]struct{}{
common.Hash{0x2}: { {0x2}: {
common.Hash{0x3a}: {}, common.Hash{0x3a}: {},
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
common.Hash{0x3b}: {}, common.Hash{0x3b}: {},
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
common.Hash{0x3a}: { {0x3a}: {
common.Hash{0x4a}: {}, common.Hash{0x4a}: {},
}, },
common.Hash{0x3b}: { {0x3b}: {
common.Hash{0x4b}: {}, common.Hash{0x4b}: {},
}, },
}, },