diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-16 05:52:57 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-16 06:03:08 +0800 |
commit | 79fa05867f78a159f4c229c21c12f0e4679b5b2e (patch) | |
tree | 89be5215a89ae128b6035b3eb2029af802719497 /xeth/xeth.go | |
parent | d116b9595cf6424293cc94d0dbe78153da860727 (diff) | |
download | dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.tar dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.tar.gz dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.tar.bz2 dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.tar.lz dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.tar.xz dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.tar.zst dexon-79fa05867f78a159f4c229c21c12f0e4679b5b2e.zip |
xeth: set balance max balance to from in call. Closes #951
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r-- | xeth/xeth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go index 0d16393c2..88cd30afc 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -778,7 +778,7 @@ func (self *XEth) PushTx(encodedTx string) (string, error) { } func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr string) (string, string, error) { - statedb := self.State().State() //self.eth.ChainManager().TransState() + statedb := self.State().State().Copy() //self.eth.ChainManager().TransState() var from *state.StateObject if len(fromStr) == 0 { accounts, err := self.backend.AccountManager().Accounts() @@ -791,6 +791,7 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st from = statedb.GetOrNewStateObject(common.HexToAddress(fromStr)) } + from.SetBalance(common.MaxBig) from.SetGasPool(self.backend.ChainManager().GasLimit()) msg := callmsg{ from: from, |