mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-29 11:47:28 -04:00
Alice to validate Bob's PSBT for correctness
In order for the re-construction of TxLock to be meaningful, we limit `Message2` to the PSBT instead of the full struct. This is a breaking change in the network layer. The PSBT is valid if: - It has at most two outputs (we allow a change output) - One of the outputs pays the agreed upon amount to a shared output script Resolves #260.
This commit is contained in:
parent
8576894c10
commit
52b9a78de2
10 changed files with 485 additions and 73 deletions
|
@ -188,7 +188,7 @@ pub struct State1 {
|
|||
impl State1 {
|
||||
pub fn next_message(&self) -> Message2 {
|
||||
Message2 {
|
||||
tx_lock: self.tx_lock.clone(),
|
||||
psbt: self.tx_lock.clone().into(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue