Remove crufty code

This commit is contained in:
Gav Wood 2016-09-23 18:25:46 +02:00 committed by Tomasz Drwięga
parent 5e7955b1f1
commit 06fc494d03

View File

@ -615,12 +615,10 @@ impl TransactionQueue {
/// to avoid breaking invariants in queue (ordered by nonces).
/// Consecutive transactions from this sender would fail otherwise (because of invalid nonce).
pub fn penalize(&mut self, transaction_hash: &H256) {
let transaction = self.by_hash.get(transaction_hash);
if transaction.is_none() {
return;
}
let transaction = transaction.expect("Early-exit for None is above.");
let transaction = match self.by_hash.get(transaction_hash) {
None => return,
Some(t) => t,
};
let sender = transaction.sender();
// Penalize all transactions from this sender