chore: changelog and docs

This commit is contained in:
James 2023-03-20 18:24:02 -07:00
parent a32fa0129e
commit d820b4d67d
No known key found for this signature in database
GPG Key ID: 38D007616833FA2F
2 changed files with 6 additions and 3 deletions

View File

@ -380,6 +380,7 @@
### Unreleased
- Revise and improve GasEscalatorMiddleware task [#2284](https://github.com/gakonst/ethers-rs/pull/2284)
- Added `openssl` and `rustls` feature flags
[#1961](https://github.com/gakonst/ethers-rs/pull/1961)
- Relax Clone requirements when Arc<Middleware> is used

View File

@ -277,7 +277,9 @@ impl<M, E> EscalationTask<M, E> {
.escalator
.get_gas_price(old_gas_price, now.duration_since(time).as_secs());
let new_txhash = if new_gas_price != old_gas_price {
let new_txhash = if new_gas_price == old_gas_price {
tx_hash
} else {
// bump the gas price
replacement_tx.gas_price = Some(new_gas_price);
@ -311,13 +313,13 @@ impl<M, E> EscalationTask<M, E> {
}
}
}
} else {
tx_hash
};
txs.push((new_txhash, replacement_tx, time, priority));
}
}
// after this big ugly loop, we dump everything back in
// we don't replace here, as the vec in the mutex may contain
// items!
self.txs.lock().await.extend(txs);
}}
}