diff --git a/client/src/client_sync/v18/raw_transactions.rs b/client/src/client_sync/v18/raw_transactions.rs index aecf3c10..5211495f 100644 --- a/client/src/client_sync/v18/raw_transactions.rs +++ b/client/src/client_sync/v18/raw_transactions.rs @@ -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 { + pub fn utxo_update_psbt(&self, psbt: &bitcoin::Psbt) -> Result { let psbt = format!("{}", psbt); - self.call("uxtoupdatepsbt", &[psbt.into()]) + self.call("utxoupdatepsbt", &[psbt.into()]) } } }; diff --git a/integration_test/tests/raw_transactions.rs b/integration_test/tests/raw_transactions.rs index c37b3172..99b69678 100644 --- a/integration_test/tests/raw_transactions.rs +++ b/integration_test/tests/raw_transactions.rs @@ -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, &[]); @@ -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. // diff --git a/types/src/v18/mod.rs b/types/src/v18/mod.rs index 62dda715..54226b8c 100644 --- a/types/src/v18/mod.rs +++ b/types/src/v18/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v19/mod.rs b/types/src/v19/mod.rs index b23e23c8..bc307de5 100644 --- a/types/src/v19/mod.rs +++ b/types/src/v19/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v20/mod.rs b/types/src/v20/mod.rs index db662c99..a4dffa39 100644 --- a/types/src/v20/mod.rs +++ b/types/src/v20/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v21/mod.rs b/types/src/v21/mod.rs index 9b404038..9bf39a2b 100644 --- a/types/src/v21/mod.rs +++ b/types/src/v21/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v22/mod.rs b/types/src/v22/mod.rs index 95f6225e..2d213b16 100644 --- a/types/src/v22/mod.rs +++ b/types/src/v22/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v23/mod.rs b/types/src/v23/mod.rs index 2d7b6e48..0abafa0e 100644 --- a/types/src/v23/mod.rs +++ b/types/src/v23/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v24/mod.rs b/types/src/v24/mod.rs index 2a9fbd3f..93892fb0 100644 --- a/types/src/v24/mod.rs +++ b/types/src/v24/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v25/mod.rs b/types/src/v25/mod.rs index a49d4743..41e95511 100644 --- a/types/src/v25/mod.rs +++ b/types/src/v25/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v26/mod.rs b/types/src/v26/mod.rs index 31af8770..817bbb99 100644 --- a/types/src/v26/mod.rs +++ b/types/src/v26/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v27/mod.rs b/types/src/v27/mod.rs index 9fbebc08..b4e33f4d 100644 --- a/types/src/v27/mod.rs +++ b/types/src/v27/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v28/mod.rs b/types/src/v28/mod.rs index 3e300966..0ae062d1 100644 --- a/types/src/v28/mod.rs +++ b/types/src/v28/mod.rs @@ -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 | | //! //! //! diff --git a/types/src/v29/mod.rs b/types/src/v29/mod.rs index 295bff69..0e9bbf18 100644 --- a/types/src/v29/mod.rs +++ b/types/src/v29/mod.rs @@ -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 | | //! //! //!