mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-29 12:06:35 -05:00
Upgrade to bdk 4.0
To achieve this we also: - upgrade rust-bitcoin to 0.26 - upgrade bitcoin-harness to latest version (which also depends bitcoin 0.26) - upgrade to latest edcsa-fun - replace cross_curve_dleq proof with sigma_fun (to avoid an upgrade dance over there)
This commit is contained in:
parent
b3f49cf83e
commit
84bc2c82b7
18 changed files with 310 additions and 263 deletions
|
|
@ -4,7 +4,7 @@ use crate::bitcoin::{
|
|||
};
|
||||
use ::bitcoin::{util::psbt::PartiallySignedTransaction, OutPoint, TxIn, TxOut, Txid};
|
||||
use anyhow::Result;
|
||||
use miniscript::{Descriptor, NullCtx};
|
||||
use miniscript::{Descriptor, DescriptorTrait};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
|
|
@ -20,7 +20,7 @@ impl TxLock {
|
|||
{
|
||||
let lock_output_descriptor = build_shared_output_descriptor(A.0, B.0);
|
||||
let address = lock_output_descriptor
|
||||
.address(wallet.get_network().await, NullCtx)
|
||||
.address(wallet.get_network().await)
|
||||
.expect("can derive address from descriptor");
|
||||
|
||||
let psbt = wallet.build_tx_lock_psbt(address, amount).await?;
|
||||
|
|
@ -54,9 +54,7 @@ impl TxLock {
|
|||
.extract_tx()
|
||||
.output
|
||||
.iter()
|
||||
.position(|output| {
|
||||
output.script_pubkey == self.output_descriptor.script_pubkey(NullCtx)
|
||||
})
|
||||
.position(|output| output.script_pubkey == self.output_descriptor.script_pubkey())
|
||||
.expect("transaction contains lock output")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue