diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go index 10b82172ca..5acdff3c97 100644 --- a/accounts/usbwallet/trezor.go +++ b/accounts/usbwallet/trezor.go @@ -308,7 +308,7 @@ func (w *trezorDriver) trezorExchange(req proto.Message, results ...proto.Messag var payload []byte - if 8+len(data) < 64*1024*1024 { + if len(data) < 64*1024*1024 { payload = make([]byte, 8+len(data)) } else { return 0, errors.New("data too large") diff --git a/log/logger.go b/log/logger.go index bc7399f921..4e4bc6e6ce 100644 --- a/log/logger.go +++ b/log/logger.go @@ -215,11 +215,6 @@ func (l *logger) New(ctx ...interface{}) Logger { func newContext(prefix []interface{}, suffix []interface{}) []interface{} { normalizedSuffix := normalize(suffix) - - if len(prefix)+len(normalizedSuffix) > 64*1024*1024 { - return make([]interface{}, 0) - } - newCtx := make([]interface{}, len(prefix)+len(normalizedSuffix)) n := copy(newCtx, prefix) copy(newCtx[n:], normalizedSuffix) @@ -331,10 +326,6 @@ type Lazy struct { type Ctx map[string]interface{} func (c Ctx) toArray() []interface{} { - if len(c)*2 > 64*1024*1024 { - return make([]interface{}, 0) - } - arr := make([]interface{}, len(c)*2) i := 0