Commit 8754f2b7 authored by Gustav Simonsson's avatar Gustav Simonsson

Fix common.Address / []byte type conversions

parent cd88295f
......@@ -545,7 +545,7 @@ func (self *Ethereum) syncAccounts(tx *types.Transaction) {
return
}
if self.accountManager.HasAccount(from.Bytes()) {
if self.accountManager.HasAccount(from) {
if self.chainManager.TxState().GetNonce(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 {
from = statedb.GetOrNewStateObject(common.Address{})
} else {
from = statedb.GetOrNewStateObject(common.BytesToAddress(accounts[0].Address))
from = statedb.GetOrNewStateObject(accounts[0].Address)
}
} else {
from = statedb.GetOrNewStateObject(common.HexToAddress(fromStr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment