Skip to content

Commit

Permalink
Keep input UTXO data through input finalization
Browse files Browse the repository at this point in the history
BIP 78 (Payjoin v1) was updated to remain in compliance
with BIP 174 (PSBT v0).

See: bitcoin/bips#1396
See also: payjoin#480
  • Loading branch information
DanGould committed Jan 23, 2025
1 parent dad5c1f commit 5d6460e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
6 changes: 0 additions & 6 deletions payjoin/src/send/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ pub(crate) enum InternalProposalError {
VersionsDontMatch { proposed: Version, original: Version },
LockTimesDontMatch { proposed: LockTime, original: LockTime },
SenderTxinSequenceChanged { proposed: Sequence, original: Sequence },
SenderTxinContainsNonWitnessUtxo,
SenderTxinContainsWitnessUtxo,
SenderTxinContainsFinalScriptSig,
SenderTxinContainsFinalScriptWitness,
TxInContainsKeyPaths,
Expand Down Expand Up @@ -188,8 +186,6 @@ impl fmt::Display for InternalProposalError {
VersionsDontMatch { proposed, original, } => write!(f, "proposed transaction version {} doesn't match the original {}", proposed, original),
LockTimesDontMatch { proposed, original, } => write!(f, "proposed transaction lock time {} doesn't match the original {}", proposed, original),
SenderTxinSequenceChanged { proposed, original, } => write!(f, "proposed transaction sequence number {} doesn't match the original {}", proposed, original),
SenderTxinContainsNonWitnessUtxo => write!(f, "an input in proposed transaction belonging to the sender contains non-witness UTXO information"),
SenderTxinContainsWitnessUtxo => write!(f, "an input in proposed transaction belonging to the sender contains witness UTXO information"),
SenderTxinContainsFinalScriptSig => write!(f, "an input in proposed transaction belonging to the sender contains finalized non-witness signature"),
SenderTxinContainsFinalScriptWitness => write!(f, "an input in proposed transaction belonging to the sender contains finalized witness signature"),
TxInContainsKeyPaths => write!(f, "proposed transaction inputs contain key paths"),
Expand Down Expand Up @@ -225,8 +221,6 @@ impl std::error::Error for InternalProposalError {
VersionsDontMatch { proposed: _, original: _ } => None,
LockTimesDontMatch { proposed: _, original: _ } => None,
SenderTxinSequenceChanged { proposed: _, original: _ } => None,
SenderTxinContainsNonWitnessUtxo => None,
SenderTxinContainsWitnessUtxo => None,
SenderTxinContainsFinalScriptSig => None,
SenderTxinContainsFinalScriptWitness => None,
TxInContainsKeyPaths => None,
Expand Down
5 changes: 0 additions & 5 deletions payjoin/src/send/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ impl PsbtContext {
original.txin.sequence,
SenderTxinSequenceChanged
);
ensure!(
proposed.psbtin.non_witness_utxo.is_none(),
SenderTxinContainsNonWitnessUtxo
);
ensure!(proposed.psbtin.witness_utxo.is_none(), SenderTxinContainsWitnessUtxo);
ensure!(
proposed.psbtin.final_script_sig.is_none(),
SenderTxinContainsFinalScriptSig
Expand Down

0 comments on commit 5d6460e

Please sign in to comment.