mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
tracers, era: show actual vs max in limit errors
This commit is contained in:
parent
41f580f209
commit
f1ef124b68
2 changed files with 2 additions and 2 deletions
|
|
@ -39,7 +39,7 @@ func GetMemoryCopyPadded(m []byte, offset, size int64) ([]byte, error) {
|
||||||
}
|
}
|
||||||
paddingNeeded := offset + size - length
|
paddingNeeded := offset + size - length
|
||||||
if paddingNeeded > memoryPadLimit {
|
if paddingNeeded > memoryPadLimit {
|
||||||
return nil, fmt.Errorf("reached limit for padding memory slice: %d", paddingNeeded)
|
return nil, fmt.Errorf("padding %d exceeds limit %d", paddingNeeded, memoryPadLimit)
|
||||||
}
|
}
|
||||||
cpy := make([]byte, size)
|
cpy := make([]byte, size)
|
||||||
if overlap := length - offset; overlap > 0 {
|
if overlap := length - offset; overlap > 0 {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ func (b *Builder) AddRLP(header, body, receipts []byte, number uint64, hash comm
|
||||||
b.written += n
|
b.written += n
|
||||||
}
|
}
|
||||||
if len(b.indexes) >= MaxEra1Size {
|
if len(b.indexes) >= MaxEra1Size {
|
||||||
return fmt.Errorf("exceeds maximum batch size of %d", MaxEra1Size)
|
return fmt.Errorf("batch size %d exceeds maximum %d", len(b.indexes), MaxEra1Size)
|
||||||
}
|
}
|
||||||
|
|
||||||
b.indexes = append(b.indexes, uint64(b.written))
|
b.indexes = append(b.indexes, uint64(b.written))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue