Skip to content

Commit 9d9f994

Browse files
committed
Fix keep/drop queue in remove_with_dependents_exn_impl
Reverse part of bc317ca
1 parent 529facf commit 9d9f994

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

ledger/src/transaction_pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ impl IndexedPool {
859859
})
860860
.unwrap();
861861

862-
let keep_queue = sender_queue.split_off(cmd_index);
863-
let drop_queue = sender_queue.clone();
862+
let drop_queue = sender_queue.split_off(cmd_index);
863+
let keep_queue = sender_queue;
864864
assert!(!drop_queue.is_empty());
865865

866866
let currency_to_remove = drop_queue.iter().fold(Amount::zero(), |acc, cmd| {

node/src/transaction_pool/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ impl TransactionPoolState {
9595
id
9696
}
9797

98-
#[allow(dead_code)]
99-
fn rebroadcast(&self, _accepted: Vec<UserCommand>, _rejected: Vec<(UserCommand, diff::Error)>) {
100-
// TODO
101-
}
102-
10398
pub fn reducer(mut state: crate::Substate<Self>, action: &TransactionPoolAction) {
10499
// Uncoment following block to save actions to `/tmp/pool.bin`
105100
// {
@@ -277,7 +272,6 @@ impl TransactionPoolState {
277272
is_sender_local,
278273
) {
279274
Ok((ApplyDecision::Accept, accepted, rejected)) => {
280-
// substate.rebroadcast(accepted, rejected);
281275
if let Some(rpc_id) = from_rpc {
282276
let dispatcher = state.into_dispatcher();
283277

@@ -290,7 +284,6 @@ impl TransactionPoolState {
290284
}
291285
}
292286
Ok((ApplyDecision::Reject, accepted, rejected)) => {
293-
// substate.rebroadcast(accepted, rejected)
294287
if let Some(rpc_id) = from_rpc {
295288
let dispatcher = state.into_dispatcher();
296289

0 commit comments

Comments
 (0)