pub(crate) fn read_timeline(
        &mut self,
        timeline_id: u64,
        count: usize,
    ) -> (Vec<SignedTransaction>, u64) {
        let mut batch = vec![];
        let mut last_timeline_id = timeline_id;
        for (address, sequence_number) in self.timeline_index.read_timeline(timeline_id, count) {
            if let Some(txn) = self
                .transactions
                .get_mut(&address)
                .and_then(|txns| txns.get(&sequence_number))
            {
                batch.push(txn.txn.clone());
                if let TimelineState::Ready(timeline_id) = txn.timeline_state {
                    last_timeline_id = timeline_id;
                }
            }
        }
        (batch, last_timeline_id)
    }
/// Read `count` transactions from timeline since `timeline_id`
/// Returns block of transactions and new last_timeline_id
Read `count` transactions from timeline since `timeline_id`
Returns block of transactions and new last_timeline_id
Read ` count ` transactions from timeline since ` timeline_id ` Returns block of transactions and new last_timeline_id
pub(crate) fn read_timeline(
        &mut self,
        timeline_id: u64,
        count: usize,
    ) -> (Vec<SignedTransaction>, u64) {
        let mut batch = vec![];
        let mut last_timeline_id = timeline_id;
        for (address, sequence_number) in self.timeline_index.read_timeline(timeline_id, count) {
            if let Some(txn) = self
                .transactions
                .get_mut(&address)
                .and_then(|txns| txns.get(&sequence_number))
            {
                batch.push(txn.txn.clone());
                if let TimelineState::Ready(timeline_id) = txn.timeline_state {
                    last_timeline_id = timeline_id;
                }
            }
        }
        (batch, last_timeline_id)
    }
pub ( crate ) fn read_timeline ( & mut self , timeline_id : u64 , count : usize , ) -> ( Vec < SignedTransaction > , u64 ) { let mut batch = vec ! [ ] ; let mut last_timeline_id = timeline_id ; for ( address , sequence_number ) in self . timeline_index . read_timeline ( timeline_id , count ) { if let Some ( txn ) = self . transactions . get_mut ( & address ) . and_then ( | txns | txns . get ( & sequence_number ) ) { batch . push ( txn . txn . clone ( ) ) ; if let TimelineState :: Ready ( timeline_id ) = txn . timeline_state { last_timeline_id = timeline_id ; } } } ( batch , last_timeline_id ) }
Read `count` transactions from timeline since `timeline_id`
Returns block of transactions and new last_timeline_id
Read ` count ` transactions from timeline since ` timeline_id ` Returns block of transactions and new last_timeline_id
&mut self
timeline_id
u64
count
usize
&mut self
timeline_id
u64
count
usize