mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 14:03:46 +00:00
fix: fix codeList type (#117)
This commit is contained in:
parent
d3bc8322dc
commit
e15d0d35cb
2 changed files with 3 additions and 3 deletions
|
|
@ -103,7 +103,7 @@ type ExtraData struct {
|
||||||
// Indicate the call succeeds or not for CALL/CREATE op
|
// Indicate the call succeeds or not for CALL/CREATE op
|
||||||
CallFailed bool `json:"callFailed,omitempty"`
|
CallFailed bool `json:"callFailed,omitempty"`
|
||||||
// CALL | CALLCODE | DELEGATECALL | STATICCALL: [tx.to address’s code, stack.nth_last(1) address’s code]
|
// CALL | CALLCODE | DELEGATECALL | STATICCALL: [tx.to address’s code, stack.nth_last(1) address’s code]
|
||||||
CodeList [][]byte `json:"codeList,omitempty"`
|
CodeList []string `json:"codeList,omitempty"`
|
||||||
// SSTORE | SLOAD: [storageProof]
|
// SSTORE | SLOAD: [storageProof]
|
||||||
// SELFDESTRUCT: [contract address’s account, stack.nth_last(0) address’s account]
|
// SELFDESTRUCT: [contract address’s account, stack.nth_last(0) address’s account]
|
||||||
// SELFBALANCE: [contract address’s account]
|
// SELFBALANCE: [contract address’s account]
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ func traceToAddressCode(l *StructLogger, scope *ScopeContext, extraData *types.E
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
code := l.env.StateDB.GetCode(*l.env.To)
|
code := l.env.StateDB.GetCode(*l.env.To)
|
||||||
extraData.CodeList = append(extraData.CodeList, code)
|
extraData.CodeList = append(extraData.CodeList, hexutil.Encode(code))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ func traceLastNAddressCode(n int) traceFunc {
|
||||||
}
|
}
|
||||||
address := common.Address(stack.data[stack.len()-1-n].Bytes20())
|
address := common.Address(stack.data[stack.len()-1-n].Bytes20())
|
||||||
code := l.env.StateDB.GetCode(address)
|
code := l.env.StateDB.GetCode(address)
|
||||||
extraData.CodeList = append(extraData.CodeList, code)
|
extraData.CodeList = append(extraData.CodeList, hexutil.Encode(code))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue