in the payjoin receiver #2011 (comment) candidate_inputs_map is a HashMap and rust's HashMap has non-deterministic iteration order (randomized per run), so the input the receiver contributes to the payjoin, and its ordering, is non-deterministic across runs.
unpredictable input ordering is itself a fingerprint, a deterministic order is analyzable and consistent.
switching to BTreeMap makes iteration deterministic (ordered by OutPoint), so the contributed input is stable and reproducible, and input ordering is consistent rather than random.
ref: payjoin/rust-payjoin#1597 (comment)
in the payjoin receiver #2011 (comment)
candidate_inputs_mapis a HashMap and rust's HashMap has non-deterministic iteration order (randomized per run), so the input the receiver contributes to the payjoin, and its ordering, is non-deterministic across runs.unpredictable input ordering is itself a fingerprint, a deterministic order is analyzable and consistent.
switching to BTreeMap makes iteration deterministic (ordered by OutPoint), so the contributed input is stable and reproducible, and input ordering is consistent rather than random.
ref: payjoin/rust-payjoin#1597 (comment)