Fix state not using "account_starting_nonce" (#1830)

* failng test

* use account_starting_nonce instead of zero

* simplier test

* jsons are getting closer

* incorrect test client and incorrect tests fix

* null_morden is using 0x0 starting nonce

* replaced json with the correct one

* superwhatever line
This commit is contained in:
Nikolay Volf
2016-08-04 19:17:39 +03:00
committed by Gav Wood
parent 25aabe6e52
commit aa59aa439d
4 changed files with 69 additions and 3 deletions

View File

@@ -310,7 +310,7 @@ impl BlockChainClient for TestBlockChainClient {
fn nonce(&self, address: &Address, id: BlockID) -> Option<U256> {
match id {
BlockID::Latest => Some(self.nonces.read().get(address).cloned().unwrap_or_else(U256::zero)),
BlockID::Latest => Some(self.nonces.read().get(address).cloned().unwrap_or(self.spec.params.account_start_nonce)),
_ => None,
}
}