Fix common.Address / []byte type conversions

This commit is contained in:
Gustav Simonsson 2015-04-19 01:09:41 +02:00
parent cd88295f5a
commit 8754f2b768
2 changed files with 2 additions and 2 deletions

View File

@ -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())
}

View File

@ -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))