Removed exported fields from state object and added proper set/getters
This commit is contained in:
@ -51,8 +51,8 @@ func StateObjectFromAccount(db ethutil.Database, addr string, account Account) *
|
||||
if ethutil.IsHex(account.Code) {
|
||||
account.Code = account.Code[2:]
|
||||
}
|
||||
obj.Code = ethutil.Hex2Bytes(account.Code)
|
||||
obj.Nonce = ethutil.Big(account.Nonce).Uint64()
|
||||
obj.SetCode(ethutil.Hex2Bytes(account.Code))
|
||||
obj.SetNonce(ethutil.Big(account.Nonce).Uint64())
|
||||
|
||||
return obj
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ func (ui *UiLib) AssetPath(p string) string {
|
||||
func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
|
||||
dbWindow := NewDebuggerWindow(self)
|
||||
object := self.eth.ChainManager().State().GetStateObject(ethutil.Hex2Bytes(contractHash))
|
||||
if len(object.Code) > 0 {
|
||||
dbWindow.SetCode(ethutil.Bytes2Hex(object.Code))
|
||||
if len(object.Code()) > 0 {
|
||||
dbWindow.SetCode(ethutil.Bytes2Hex(object.Code()))
|
||||
}
|
||||
dbWindow.SetData(data)
|
||||
|
||||
|
Reference in New Issue
Block a user