mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
eth/tracers: omit empty memory
This commit is contained in:
parent
4038c59845
commit
c111269745
1 changed files with 1 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ func (s *StructLog) toLegacyJSON() json.RawMessage {
|
|||
if len(s.ReturnData) > 0 {
|
||||
msg.ReturnData = hexutil.Bytes(s.ReturnData).String()
|
||||
}
|
||||
if s.Memory != nil {
|
||||
if s.Memory != nil && len(s.Memory) > 0 {
|
||||
memory := make([]string, 0, (len(s.Memory)+31)/32)
|
||||
for i := 0; i+32 <= len(s.Memory); i += 32 {
|
||||
memory = append(memory, fmt.Sprintf("%x", s.Memory[i:i+32]))
|
||||
|
|
|
|||
Loading…
Reference in a new issue