Fix common.Address / []byte type conversions

release/1.0.1
Gustav Simonsson 10 years ago
parent cd88295f5a
commit 8754f2b768
  1. 2
      eth/backend.go
  2. 2
      xeth/xeth.go

@ -545,7 +545,7 @@ func (self *Ethereum) syncAccounts(tx *types.Transaction) {
return return
} }
if self.accountManager.HasAccount(from.Bytes()) { if self.accountManager.HasAccount(from) {
if self.chainManager.TxState().GetNonce(from) < tx.Nonce() { if self.chainManager.TxState().GetNonce(from) < tx.Nonce() {
self.chainManager.TxState().SetNonce(from, tx.Nonce()) self.chainManager.TxState().SetNonce(from, tx.Nonce())
} }

@ -781,7 +781,7 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
if err != nil || len(accounts) == 0 { if err != nil || len(accounts) == 0 {
from = statedb.GetOrNewStateObject(common.Address{}) from = statedb.GetOrNewStateObject(common.Address{})
} else { } else {
from = statedb.GetOrNewStateObject(common.BytesToAddress(accounts[0].Address)) from = statedb.GetOrNewStateObject(accounts[0].Address)
} }
} else { } else {
from = statedb.GetOrNewStateObject(common.HexToAddress(fromStr)) from = statedb.GetOrNewStateObject(common.HexToAddress(fromStr))

Loading…
Cancel
Save