Skip to content

Commit

Permalink
Contribute even when a sender makes no change
Browse files Browse the repository at this point in the history
A pure consolidation does not suffer from Unnecessary Input Heuristic.
A Payjoin consolidation without sender change still breaks Common Input
Heuristic. Allow it.
  • Loading branch information
DanGould committed May 21, 2024
1 parent 12fd5ca commit cf67715
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions payjoin/src/receive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,9 @@ impl ProvisionalProposal {
return Err(SelectionError::from(InternalSelectionError::Empty));
}

if self.payjoin_psbt.outputs.len() != 2 {
// Current UIH techniques only support many-input, two-output transactions.
if self.payjoin_psbt.outputs.len() > 2 {
// This UIH avoidance function supports only
// many-input, n-output transactions such that n <= 2 for now
return Err(SelectionError::from(InternalSelectionError::TooManyOutputs));
}

Expand Down

0 comments on commit cf67715

Please sign in to comment.