Remove crufty code
This commit is contained in:
parent
5e7955b1f1
commit
06fc494d03
@ -615,12 +615,10 @@ impl TransactionQueue {
|
|||||||
/// to avoid breaking invariants in queue (ordered by nonces).
|
/// to avoid breaking invariants in queue (ordered by nonces).
|
||||||
/// Consecutive transactions from this sender would fail otherwise (because of invalid nonce).
|
/// Consecutive transactions from this sender would fail otherwise (because of invalid nonce).
|
||||||
pub fn penalize(&mut self, transaction_hash: &H256) {
|
pub fn penalize(&mut self, transaction_hash: &H256) {
|
||||||
let transaction = self.by_hash.get(transaction_hash);
|
let transaction = match self.by_hash.get(transaction_hash) {
|
||||||
if transaction.is_none() {
|
None => return,
|
||||||
return;
|
Some(t) => t,
|
||||||
}
|
};
|
||||||
|
|
||||||
let transaction = transaction.expect("Early-exit for None is above.");
|
|
||||||
let sender = transaction.sender();
|
let sender = transaction.sender();
|
||||||
|
|
||||||
// Penalize all transactions from this sender
|
// Penalize all transactions from this sender
|
||||||
|
Loading…
Reference in New Issue
Block a user