Skip to content

Commit

Permalink
dev: chg: remove checks on logger as not harmful
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Oct 10, 2023
1 parent ffa5161 commit ab57967
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion accounts/usbwallet/trezor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 0 additions & 9 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ab57967

Please sign in to comment.