@@ -22,15 +22,13 @@ import (
2222
2323 "github.com/erigontech/erigon-lib/chain"
2424 libcommon "github.com/erigontech/erigon-lib/common"
25+ "github.com/erigontech/erigon-lib/common/math"
26+ "github.com/erigontech/erigon-lib/crypto"
2527 "github.com/erigontech/erigon-lib/log/v3"
26- types2 "github.com/erigontech/erigon-lib/types"
27-
2828 "github.com/erigontech/erigon/common"
29- "github.com/erigontech/erigon/common/math"
3029 "github.com/erigontech/erigon/core/tracing"
3130 "github.com/erigontech/erigon/core/types"
3231 "github.com/erigontech/erigon/core/vm"
33- "github.com/erigontech/erigon/crypto"
3432 "github.com/erigontech/erigon/eth/tracers"
3533 "github.com/erigontech/erigon/params"
3634 pbeth "github.com/erigontech/erigon/pb/sf/ethereum/type/v2"
@@ -1435,7 +1433,7 @@ func (f *Firehose) panicInvalidState(msg string, callerSkip int) string {
14351433 }
14361434
14371435 if f .transaction != nil {
1438- msg += fmt . Sprintf ( " in transaction %s" , hex .EncodeToString (f .transaction .Hash ) )
1436+ msg += " in transaction " + hex .EncodeToString (f .transaction .Hash )
14391437 }
14401438
14411439 panic (fmt .Errorf ("%s (caller=%s, init=%t, inBlock=%t, inTransaction=%t, inCall=%t)" , msg , caller , f .chainConfig != nil , f .block != nil , f .transaction != nil , f .callStack .HasActiveCall ()))
@@ -1681,7 +1679,7 @@ func newTxReceiptFromChain(receipt *types.Receipt, txType pbeth.TransactionTrace
16811679 return out
16821680}
16831681
1684- func newAccessListFromChain (accessList types2 .AccessList ) (out []* pbeth.AccessTuple ) {
1682+ func newAccessListFromChain (accessList types .AccessList ) (out []* pbeth.AccessTuple ) {
16851683 if len (accessList ) == 0 {
16861684 return nil
16871685 }
@@ -1927,7 +1925,7 @@ func (s *CallStack) NextIndex() uint32 {
19271925
19281926func (s * CallStack ) Pop () (out * pbeth.Call ) {
19291927 if len (s .stack ) == 0 {
1930- panic (fmt . Errorf ("pop from empty call stack" ))
1928+ panic (errors . New ("pop from empty call stack" ))
19311929 }
19321930
19331931 out = s .stack [len (s .stack )- 1 ]
@@ -2180,7 +2178,7 @@ func validateFirehoseKnownTransactionType(txType byte, isKnownFirehoseTxType boo
21802178 if err != nil {
21812179 if err == types .ErrTxTypeNotSupported {
21822180 if isKnownFirehoseTxType {
2183- return fmt . Errorf ("firehose known type but encoding RLP of receipt led to 'types.ErrTxTypeNotSupported'" )
2181+ return errors . New ("firehose known type but encoding RLP of receipt led to 'types.ErrTxTypeNotSupported'" )
21842182 }
21852183
21862184 // It's not a known type and encoding reported the same, so validation is OK
@@ -2197,7 +2195,7 @@ func validateFirehoseKnownTransactionType(txType byte, isKnownFirehoseTxType boo
21972195 if err != nil {
21982196 if err == types .ErrTxTypeNotSupported {
21992197 if isKnownFirehoseTxType {
2200- return fmt . Errorf ("firehose known type but decoding of RLP of receipt led to 'types.ErrTxTypeNotSupported'" )
2198+ return errors . New ("firehose known type but decoding of RLP of receipt led to 'types.ErrTxTypeNotSupported'" )
22012199 }
22022200
22032201 // It's not a known type and decoding reported the same, so validation is OK
@@ -2235,7 +2233,7 @@ func validateAddressField(into *validationResult, field string, a, b libcommon.A
22352233}
22362234
22372235func validateBigIntField (into * validationResult , field string , a , b * big.Int ) {
2238- equal := false
2236+ var equal bool
22392237 if a == nil && b == nil {
22402238 equal = true
22412239 } else if a == nil || b == nil {
0 commit comments