Skip to content

Commit 5491079

Browse files
committed
Allow outputs to be increased
1 parent bd97400 commit 5491079

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bip-0078.mediawiki

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ The sender should check the payjoin proposal before signing it to prevent a mali
271271
*** The amount that was substracted from the output's value is less or equal to <code>maxadditionalfeecontribution</code>. Let's call this amount <code>actual contribution</code>.
272272
*** Make sure the actual contribution is only paying fee: The <code>actual contribution</code> is less or equals to the difference of absolute fee between the payjoin proposal and the original PSBT.
273273
*** Make sure the actual contribution is only paying for fee incurred by additional inputs: <code>actual contribution</code> is less or equals to <code>originalPSBTFeeRate * vsize(sender_input_type) * (count(original_psbt_inputs) - count(payjoin_proposal_inputs))</code>. (see [[#fee-output|Fee output]] section)
274-
** If the output is the payment output and payment output substitution is disabled.
274+
** If the output is the payment output and payment output substitution is allowed.
275275
*** Do not make any check
276276
** Else
277-
*** Make sure the output's value did not changed.
277+
*** Make sure the output's value did not decreased.
278278
** Verify that all sender's outputs (ie, all outputs except the output actually paid to the receiver) from the original PSBT are in the proposal.
279279
* Once the proposal is signed, if <code>minfeerate</code> was specified, check that the fee rate of the payjoin transaction is not less than this value.
280280
@@ -561,8 +561,8 @@ public async Task<PSBT> RequestPayjoin(
561561
}
562562
else
563563
{
564-
if (originalOutput.OriginalTxOut.Value != proposedPSBTOutput.Value)
565-
throw new PayjoinSenderException("The receiver changed one of our outputs");
564+
if (originalOutput.OriginalTxOut.Value > proposedPSBTOutput.Value)
565+
throw new PayjoinSenderException("The receiver decreased the value of one of the outputs");
566566
}
567567
// We fill up information we had on the signed PSBT, so we can sign it.
568568
foreach (var hdKey in output.SignedPSBTOutput.HDKeyPaths)

0 commit comments

Comments
 (0)