From 925b47514b7d25c6b166366f7bf49377e6345c19 Mon Sep 17 00:00:00 2001 From: Buffrr Date: Tue, 17 Mar 2026 00:32:08 +0100 Subject: [PATCH] Update build_chain_proof to include delegations for nums --- client/src/rpc.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 2de693d..7be7665 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -1783,6 +1783,21 @@ impl AsyncChainState { NumOutpointKey::from_outpoint::(fpt.outpoint()).into() ); most_recent_update = std::cmp::max(most_recent_update, fpt.numout.num.last_update); + + // insert delegate information + let operator_id = NumId::from_spk::(fpt.numout.script_pubkey); + let operator = state.get_num_info(&operator_id)?; + if let Some(operator) = operator { + num_tree_keys.insert( + NumOutpointKey::from_outpoint::(operator.outpoint()).into() + ); + + most_recent_update = std::cmp::max(most_recent_update, operator.numout.num.last_update); + + } else { + num_tree_keys.insert(operator_id.into()); + } + } else { // non-existence proof num_tree_keys.insert(key.into()); @@ -1794,6 +1809,18 @@ impl AsyncChainState { NumOutpointKey::from_outpoint::(fpt.outpoint()).into() ); most_recent_update = std::cmp::max(most_recent_update, fpt.numout.num.last_update); + + // insert delegate information + let operator_id = NumId::from_spk::(fpt.numout.script_pubkey); + let operator = state.get_num_info(&operator_id)?; + if let Some(operator) = operator { + num_tree_keys.insert( + NumOutpointKey::from_outpoint::(operator.outpoint()).into() + ); + most_recent_update = std::cmp::max(most_recent_update, operator.numout.num.last_update); + } else { + num_tree_keys.insert(operator_id.into()); + } } else { // non-existence proof num_tree_keys.insert(id.into());