MCPcopy Create free account
hub / github.com/base/base / insert_cursor

Method insert_cursor

crates/execution/txpool/src/pool.rs:1116–1134  ·  view source on GitHub ↗

Where a lane transaction entering `store` anchors its lane. Sidecar lanes sit at the validated channel nonce. Validity lanes additionally place their executable cursor behind the standard store's pending run, cut short at a same-slot transaction this insertion replaces.

(
        &self,
        store: PoolStore,
        transaction: &T,
        state_nonce: u64,
        cross: Option<&CrossStoreReplacement<T>>,
    )

Source from the content-addressed store, hash-verified

1114 /// place their executable cursor behind the standard store's pending run,
1115 /// cut short at a same-slot transaction this insertion replaces.
1116 fn insert_cursor(
1117 &self,
1118 store: PoolStore,
1119 transaction: &T,
1120 state_nonce: u64,
1121 cross: Option<&CrossStoreReplacement<T>>,
1122 ) -> LaneCursor {
1123 if store != PoolStore::Validity {
1124 return LaneCursor::at(state_nonce);
1125 }
1126 let Some(lane_id) = Self::lane_id_of(transaction) else {
1127 return LaneCursor::at(state_nonce);
1128 };
1129 let mut next_nonce = self.standard_pending_end(lane_id, state_nonce);
1130 if let Some(cross) = cross {
1131 next_nonce = next_nonce.min(cross.transaction.nonce());
1132 }
1133 LaneCursor { state_nonce, next_nonce: next_nonce.max(state_nonce) }
1134 }
1135
1136 /// Undoes a lane insertion that a post-insert check rejected: removes the
1137 /// newcomer, re-announces the lane, and restores the transaction it replaced

Callers 1

Calls 5

standard_pending_endMethod · 0.80
minMethod · 0.80
maxMethod · 0.80
atFunction · 0.50
nonceMethod · 0.45

Tested by

no test coverage detected