fixed transaction deadlock

This commit is contained in:
debris 2016-04-11 12:44:57 +02:00 committed by arkpar
parent f02f99cd3f
commit 8f63f6d32a
1 changed files with 1 additions and 5 deletions

View File

@ -184,13 +184,9 @@ impl<C, S, A, M, EM> EthClient<C, S, A, M, EM>
let hash = signed_transaction.hash();
let import = {
let miner = take_weak!(self.miner);
let client = take_weak!(self.client);
take_weak!(self.miner).import_transactions(vec![signed_transaction], |a: &Address| AccountDetails {
nonce: miner
.last_nonce(a)
.map(|nonce| nonce + U256::one())
.unwrap_or_else(|| client.nonce(a)),
nonce: client.nonce(a),
balance: client.balance(a),
})
};