Skip to content

Commit e200658

Browse files
committed
Test utxoupdatepsbt
`utxoupdatepsbt` is implemented but untested. There are no return changes up to v29. Add a test and update the types table.
1 parent 435f2e9 commit e200658

File tree

13 files changed

+26
-14
lines changed

13 files changed

+26
-14
lines changed

integration_test/tests/raw_transactions.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,20 @@ fn raw_transactions__test_mempool_accept__modelled() {
412412
}
413413

414414
#[test]
415-
#[cfg(not(feature = "v17"))] // utxoupdatepsbt was added in v0.18.
416-
fn raw_transactions__utxo_update_psbt() {}
415+
#[cfg(not(feature = "v17"))]
416+
fn raw_transactions__utxo_update_psbt__modelled() {
417+
let node = Node::with_wallet(Wallet::Default, &[]);
418+
node.fund_wallet();
419+
420+
let psbt = create_a_psbt(&node);
421+
let json: UtxoUpdatePsbt = node
422+
.client
423+
.utxo_update_psbt(&psbt)
424+
.expect("utxoupdatepsbt");
425+
let model: mtype::UtxoUpdatePsbt = json.into_model().expect("UtxoUpdatePsbt into model");
426+
427+
assert!(model.0.inputs.len() >= psbt.inputs.len());
428+
}
417429

418430
// Manipulates raw transactions.
419431
//

types/src/v18/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
//! | sendrawtransaction | version + model | |
134134
//! | signrawtransactionwithkey | version + model | |
135135
//! | testmempoolaccept | version + model | |
136-
//! | utxoupdatepsbt | version + model | UNTESTED |
136+
//! | utxoupdatepsbt | version + model | |
137137
//!
138138
//! </details>
139139
//!

types/src/v19/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
//! | sendrawtransaction | version + model | |
134134
//! | signrawtransactionwithkey | version + model | |
135135
//! | testmempoolaccept | version + model | |
136-
//! | utxoupdatepsbt | version + model | UNTESTED |
136+
//! | utxoupdatepsbt | version + model | |
137137
//!
138138
//! </details>
139139
//!

types/src/v20/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
//! | sendrawtransaction | version + model | |
135135
//! | signrawtransactionwithkey | version + model | |
136136
//! | testmempoolaccept | version + model | |
137-
//! | utxoupdatepsbt | version + model | UNTESTED |
137+
//! | utxoupdatepsbt | version + model | |
138138
//!
139139
//! </details>
140140
//!

types/src/v21/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
//! | sendrawtransaction | version + model | |
136136
//! | signrawtransactionwithkey | version + model | |
137137
//! | testmempoolaccept | version + model | |
138-
//! | utxoupdatepsbt | version + model | UNTESTED |
138+
//! | utxoupdatepsbt | version + model | |
139139
//!
140140
//! </details>
141141
//!

types/src/v22/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
//! | sendrawtransaction | version + model | |
136136
//! | signrawtransactionwithkey | version + model | |
137137
//! | testmempoolaccept | version + model | |
138-
//! | utxoupdatepsbt | version + model | UNTESTED |
138+
//! | utxoupdatepsbt | version + model | |
139139
//!
140140
//! </details>
141141
//!

types/src/v23/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
//! | sendrawtransaction | version + model | |
127127
//! | signrawtransactionwithkey | version + model | |
128128
//! | testmempoolaccept | version + model | |
129-
//! | utxoupdatepsbt | version + model | UNTESTED |
129+
//! | utxoupdatepsbt | version + model | |
130130
//!
131131
//! </details>
132132
//!

types/src/v24/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
//! | sendrawtransaction | version + model | |
128128
//! | signrawtransactionwithkey | version + model | |
129129
//! | testmempoolaccept | version + model | |
130-
//! | utxoupdatepsbt | version + model | UNTESTED |
130+
//! | utxoupdatepsbt | version + model | |
131131
//!
132132
//! </details>
133133
//!

types/src/v25/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
//! | sendrawtransaction | version + model | |
129129
//! | signrawtransactionwithkey | version + model | |
130130
//! | testmempoolaccept | version + model | |
131-
//! | utxoupdatepsbt | version + model | UNTESTED |
131+
//! | utxoupdatepsbt | version + model | |
132132
//!
133133
//! </details>
134134
//!

types/src/v26/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
//! | signrawtransactionwithkey | version + model | |
137137
//! | submitpackage | version + model | |
138138
//! | testmempoolaccept | version + model | |
139-
//! | utxoupdatepsbt | version + model | UNTESTED |
139+
//! | utxoupdatepsbt | version + model | |
140140
//!
141141
//! </details>
142142
//!

0 commit comments

Comments
 (0)