aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/debugger.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-10 18:04:11 +0800
committerobscuren <geffobscura@gmail.com>2015-03-10 18:04:11 +0800
commit05c9351659e0482aeb29f80903286aefc671f0c5 (patch)
tree56132f55a3f826ce852c5d053c7e8984932e7878 /cmd/mist/debugger.go
parent0db4a0e898d09ffa7b6b1289e9a334edc0001cfa (diff)
parent80985f97da8174576ee227909035a364af2fd6c9 (diff)
downloadgo-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.tar
go-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.tar.gz
go-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.tar.bz2
go-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.tar.lz
go-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.tar.xz
go-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.tar.zst
go-tangerine-05c9351659e0482aeb29f80903286aefc671f0c5.zip
Merge branch 'accounts-integration' of https://github.com/fjl/go-ethereum into fjl-accounts-integration
Diffstat (limited to 'cmd/mist/debugger.go')
-rw-r--r--cmd/mist/debugger.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go
index c1ab2f3f1..bd8ddde37 100644
--- a/cmd/mist/debugger.go
+++ b/cmd/mist/debugger.go
@@ -137,16 +137,18 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
return
}
+ // TODO: improve this
+ allAccounts, _ := self.lib.eth.AccountManager().Accounts()
+
var (
gas = ethutil.Big(gasStr)
gasPrice = ethutil.Big(gasPriceStr)
value = ethutil.Big(valueStr)
- // Contract addr as test address
- keyPair = self.lib.eth.KeyManager().KeyPair()
+ acc = allAccounts[0]
)
statedb := self.lib.eth.ChainManager().TransState()
- account := self.lib.eth.ChainManager().TransState().GetAccount(keyPair.Address())
+ account := self.lib.eth.ChainManager().TransState().GetAccount(acc.Address)
contract := statedb.NewStateObject([]byte{0})
contract.SetCode(script)
contract.SetBalance(value)