From ce4091695f233e6efdea775ef6710b5a4264a2ca Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Thu, 9 Nov 2023 12:38:06 -0500 Subject: [PATCH] Document a choice of variable name --- processor/src/multisigs/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/processor/src/multisigs/mod.rs b/processor/src/multisigs/mod.rs index 3361141a..6315ef5b 100644 --- a/processor/src/multisigs/mod.rs +++ b/processor/src/multisigs/mod.rs @@ -823,7 +823,17 @@ impl MultisigManager { // If these aren't externally received funds, don't handle it as an instruction outputs.retain(|output| output.kind() == OutputType::External); + // These plans are of limited context. They're only allowed the outputs newly received + // within this block and are intended to handle forwarding transactions/refunds + // Those all end up as plans with a single input, leading to a later check: + /* + if to_be_forwarded { + assert_eq!(plan.inputs.len(), 1); + } + Hence the name, which places that assumed precondition into verbiage here. + */ let mut single_input_plans = vec![]; + // If the old multisig is explicitly only supposed to forward, create all such plans now if step == RotationStep::ForwardFromExisting { let mut i = 0;