From 9b04b634bdcac3700ac2d5a35c00bf89b1518d59 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 00:46:47 +0000 Subject: [PATCH] Fixup iterator method (#16357) (#16358) (cherry picked from commit 1a13d22984452fe6fd6351e0b4cffc3cb65d1a4e) Co-authored-by: Tyera Eulberg --- ledger/src/blockstore.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index 356cc58b5b..d709af3754 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -2055,7 +2055,7 @@ impl Blockstore { ); let confirmed_unrooted_slots: Vec<_> = AncestorIterator::new_inclusive(highest_confirmed_slot, self) - .filter(|&slot| slot > self.last_root()) + .take_while(|&slot| slot > self.last_root()) .collect(); self.get_transaction_with_status(signature, &confirmed_unrooted_slots) } @@ -2214,7 +2214,7 @@ impl Blockstore { ) ); let confirmed_unrooted_slots: Vec<_> = AncestorIterator::new_inclusive(highest_slot, self) - .filter(|&slot| slot > self.last_root()) + .take_while(|&slot| slot > self.last_root()) .collect(); // Figure the `slot` to start listing signatures at, based on the ledger location of the