Fixing update height bug

This commit is contained in:
Tomasz Drwięga 2016-03-10 11:14:25 +01:00
parent 276768a826
commit 0cf405527e
1 changed files with 6 additions and 1 deletions

View File

@ -277,7 +277,12 @@ impl TransactionQueue {
};
for k in all_nonces_from_sender {
let order = self.future.drop(&sender, &k).unwrap();
self.future.insert(sender.clone(), k, order.update_height(k, current_nonce));
if k >= current_nonce {
self.future.insert(sender.clone(), k, order.update_height(k, current_nonce));
} else {
// Remove the transaction completely
self.by_hash.remove(&order.hash);
}
}
}