Change setNonce, getNonce to use AccountNonce, which is uint64 from UInt256

This commit is contained in:
coffeepots 2018-08-31 18:38:17 +01:00 committed by zah
parent 0229d16fed
commit 1427d59f27
1 changed files with 2 additions and 2 deletions

View File

@ -105,13 +105,13 @@ proc getStorage*(db: AccountStateDB, address: EthAddress, slot: UInt256): (UInt2
else:
result = (0.u256, false)
proc setNonce*(db: var AccountStateDB, address: EthAddress, newNonce: UInt256) =
proc setNonce*(db: var AccountStateDB, address: EthAddress, newNonce: AccountNonce) =
var account = db.getAccount(address)
if newNonce != account.nonce:
account.nonce = newNonce
db.setAccount(address, account)
proc getNonce*(db: AccountStateDB, address: EthAddress): UInt256 =
proc getNonce*(db: AccountStateDB, address: EthAddress): AccountNonce =
let account = db.getAccount(address)
account.nonce