Skip to content

Commit

Permalink
eth/tracers, trie: fix vet nits
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Jun 7, 2022
1 parent 765c110 commit 2e07492
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ issues:
linters:
- deadcode
- staticcheck
- path: internal/build/pgp.go
text: 'SA1019: package golang.org/x/crypto/openpgp is deprecated'
- path: core/vm/contracts.go
text: 'SA1019: package golang.org/x/crypto/ripemd160 is deprecated'
- path: accounts/usbwallet/trezor.go
Expand Down
5 changes: 0 additions & 5 deletions eth/tracers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,9 @@ func TestTracingWithOverrides(t *testing.T) {
}))
randomAccounts := newAccounts(3)
type res struct {
<<<<<<< HEAD
Gas int
Failed bool
ReturnValue string
=======
Gas int
Failed bool
>>>>>>> c50f1c6ef0 (all: enable more linters)
}
var testSuite = []struct {
blockNumber rpc.BlockNumber
Expand Down
4 changes: 4 additions & 0 deletions trie/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func newTracer() *tracer {
}
}

/*
// onRead tracks the newly loaded trie node and caches the rlp-encoded blob internally.
// Don't change the value outside of function since it's not deep-copied.
func (t *tracer) onRead(key []byte, val []byte) {
Expand All @@ -59,6 +60,7 @@ func (t *tracer) onRead(key []byte, val []byte) {
}
t.origin[string(key)] = val
}
*/

// onInsert tracks the newly inserted trie node. If it's already in the deletion set
// (resurrected node), then just wipe it from the deletion set as the "untouched".
Expand Down Expand Up @@ -115,6 +117,7 @@ func (t *tracer) deleteList() [][]byte {
return ret
}

/*
// getPrev returns the cached original value of the specified node.
func (t *tracer) getPrev(key []byte) []byte {
// Don't panic on uninitialized tracer, it's possible in testing.
Expand All @@ -123,6 +126,7 @@ func (t *tracer) getPrev(key []byte) []byte {
}
return t.origin[string(key)]
}
*/

// reset clears the content tracked by tracer.
func (t *tracer) reset() {
Expand Down

0 comments on commit 2e07492

Please sign in to comment.