From 2e074929f59f3dc89c155be37b22da9569bdb38b Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 7 Jun 2022 16:48:17 +0200 Subject: [PATCH] eth/tracers, trie: fix vet nits --- .golangci.yml | 2 ++ eth/tracers/api_test.go | 5 ----- trie/utils.go | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 208f60aba17e..b4aa0a01d779 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index 12876d20b50c..bc12b9275160 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -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 diff --git a/trie/utils.go b/trie/utils.go index fe7f6e52f9eb..7e26915041ef 100644 --- a/trie/utils.go +++ b/trie/utils.go @@ -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) { @@ -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". @@ -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. @@ -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() {