Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/src/client_sync/v18/raw_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ macro_rules! impl_client_v18__join_psbts {
};
}

/// Implements Bitcoin Core JSON-RPC API method `uxtoupdatepsbt`.
/// Implements Bitcoin Core JSON-RPC API method `utxoupdatepsbt`.
#[macro_export]
macro_rules! impl_client_v18__utxo_update_psbt {
() => {
impl Client {
pub fn utxo_update_psbt(&self, psbt: &bitcoin::Psbt) -> Result<JoinPsbts> {
pub fn utxo_update_psbt(&self, psbt: &bitcoin::Psbt) -> Result<UtxoUpdatePsbt> {
let psbt = format!("{}", psbt);
self.call("uxtoupdatepsbt", &[psbt.into()])
self.call("utxoupdatepsbt", &[psbt.into()])
}
}
};
Expand Down
34 changes: 32 additions & 2 deletions integration_test/tests/raw_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,24 @@ fn raw_transactions__get_raw_transaction__modelled() {

}

#[test]
#[cfg(not(feature = "v17"))]
fn raw_transactions__join_psbts__modelled() {
let node = Node::with_wallet(Wallet::Default, &[]);
node.fund_wallet();

let psbt1 = create_a_psbt(&node);
let psbt2 = create_a_psbt(&node);

let json: JoinPsbts = node
.client
.join_psbts(&[psbt1.clone(), psbt2.clone()])
.expect("joinpsbts");
let model: mtype::JoinPsbts = json.into_model().expect("JoinPsbts into model");

assert_eq!(model.0.inputs.len(), psbt1.inputs.len() + psbt2.inputs.len());
}

#[test]
fn raw_transactions__sign_raw_transaction__modelled() {
let node = Node::with_wallet(Wallet::Default, &[]);
Expand Down Expand Up @@ -412,8 +430,20 @@ fn raw_transactions__test_mempool_accept__modelled() {
}

#[test]
#[cfg(not(feature = "v17"))] // utxoupdatepsbt was added in v0.18.
fn raw_transactions__utxo_update_psbt() {}
#[cfg(not(feature = "v17"))]
fn raw_transactions__utxo_update_psbt__modelled() {
let node = Node::with_wallet(Wallet::Default, &[]);
node.fund_wallet();

let psbt = create_a_psbt(&node);
let json: UtxoUpdatePsbt = node
.client
.utxo_update_psbt(&psbt)
.expect("utxoupdatepsbt");
let model: mtype::UtxoUpdatePsbt = json.into_model().expect("UtxoUpdatePsbt into model");

assert!(model.0.inputs.len() >= psbt.inputs.len());
}

// Manipulates raw transactions.
//
Expand Down
4 changes: 2 additions & 2 deletions types/src/v18/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v19/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v20/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v21/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v22/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v23/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v24/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v25/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v26/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | submitpackage | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v27/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | submitpackage | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v28/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | submitpackage | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down
4 changes: 2 additions & 2 deletions types/src/v29/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@
//! | finalizepsbt | version + model | |
//! | fundrawtransaction | version + model | |
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
//! | joinpsbts | version + model | UNTESTED |
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | |
//! | submitpackage | version + model | |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | UNTESTED |
//! | utxoupdatepsbt | version + model | |
//!
//! </details>
//!
Expand Down