fix(zone-sdk): fix last msg id in the checkpoint (#3414)

This commit is contained in:
Petar Radovic
2026-08-25 16:56:25 +00:00
committed by GitHub
parent c64367ab37
commit fce89b8f61
2 changed files with 4 additions and 14 deletions
+4 -8
View File
@@ -487,16 +487,12 @@ where
Some(update) => {
Self::log_channel_update(&update);
let new_channel_tip = update.new_channel_tip;
let built = self.build_channel_update(update);
let has_pending = self
.state
.as_ref()
.is_some_and(TxState::has_pending_inscriptions);
if !built.orphaned.is_empty() || !has_pending {
self.last_msg_id = new_channel_tip;
// Advance the tip to the current valid publish parent (channel
// tip + our pending tail), the same value publishing chains on.
if let (Some(state), Some(tip)) = (self.state.as_ref(), self.current_tip) {
self.last_msg_id = state.publish_parent(tip);
}
built
-6
View File
@@ -536,12 +536,6 @@ impl TxState {
self.pending.values().filter(|p| p.posted).count()
}
/// Whether there are pending channel inscriptions.
#[must_use]
pub fn has_pending_inscriptions(&self) -> bool {
!self.pending.is_empty()
}
/// Remove pending inscriptions whose lineage does NOT reach the current
/// channel tip and that aren't already in a block on this branch.
/// Returns the removed entries in **parent-before-child (BFS) order** so