Skip to content

Commit 469f2e8

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

File tree

13 files changed

+29
-12
lines changed

13 files changed

+29
-12
lines changed

integration_test/tests/raw_transactions.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,23 @@ fn raw_transactions__get_raw_transaction__modelled() {
308308
.expect("GetRawTransactionVerbose into model");
309309

310310
}
311+
t #[test]
312+
#[cfg(not(feature = "v17"))]
313+
fn raw_transactions__join_psbts__modelled() {
314+
let node = Node::with_wallet(Wallet::Default, &[]);
315+
node.fund_wallet();
316+
317+
let psbt1 = create_a_psbt(&node);
318+
let psbt2 = create_a_psbt(&node);
319+
320+
let json: JoinPsbts = node
321+
.client
322+
.join_psbts(&[psbt1.clone(), psbt2.clone()])
323+
.expect("joinpsbts");
324+
let model: mtype::JoinPsbts = json.into_model().expect("JoinPsbts into model");
325+
326+
assert_eq!(model.0.inputs.len(), psbt1.inputs.len() + psbt2.inputs.len());
327+
}
311328

312329
#[test]
313330
fn raw_transactions__sign_raw_transaction__modelled() {

types/src/v18/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
//! | finalizepsbt | version + model | |
130130
//! | fundrawtransaction | version + model | |
131131
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
132-
//! | joinpsbts | version + model | UNTESTED |
132+
//! | joinpsbts | version + model | |
133133
//! | sendrawtransaction | version + model | |
134134
//! | signrawtransactionwithkey | version + model | |
135135
//! | testmempoolaccept | version + model | |

types/src/v19/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
//! | finalizepsbt | version + model | |
130130
//! | fundrawtransaction | version + model | |
131131
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
132-
//! | joinpsbts | version + model | UNTESTED |
132+
//! | joinpsbts | version + model | |
133133
//! | sendrawtransaction | version + model | |
134134
//! | signrawtransactionwithkey | version + model | |
135135
//! | testmempoolaccept | version + model | |

types/src/v20/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
//! | finalizepsbt | version + model | |
131131
//! | fundrawtransaction | version + model | |
132132
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
133-
//! | joinpsbts | version + model | UNTESTED |
133+
//! | joinpsbts | version + model | |
134134
//! | sendrawtransaction | version + model | |
135135
//! | signrawtransactionwithkey | version + model | |
136136
//! | testmempoolaccept | version + model | |

types/src/v21/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
//! | finalizepsbt | version + model | |
132132
//! | fundrawtransaction | version + model | |
133133
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
134-
//! | joinpsbts | version + model | UNTESTED |
134+
//! | joinpsbts | version + model | |
135135
//! | sendrawtransaction | version + model | |
136136
//! | signrawtransactionwithkey | version + model | |
137137
//! | testmempoolaccept | version + model | |

types/src/v22/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
//! | finalizepsbt | version + model | |
132132
//! | fundrawtransaction | version + model | |
133133
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
134-
//! | joinpsbts | version + model | UNTESTED |
134+
//! | joinpsbts | version + model | |
135135
//! | sendrawtransaction | version + model | |
136136
//! | signrawtransactionwithkey | version + model | |
137137
//! | testmempoolaccept | version + model | |

types/src/v23/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
//! | finalizepsbt | version + model | |
123123
//! | fundrawtransaction | version + model | |
124124
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
125-
//! | joinpsbts | version + model | UNTESTED |
125+
//! | joinpsbts | version + model | |
126126
//! | sendrawtransaction | version + model | |
127127
//! | signrawtransactionwithkey | version + model | |
128128
//! | testmempoolaccept | version + model | |

types/src/v24/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
//! | finalizepsbt | version + model | |
124124
//! | fundrawtransaction | version + model | |
125125
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
126-
//! | joinpsbts | version + model | UNTESTED |
126+
//! | joinpsbts | version + model | |
127127
//! | sendrawtransaction | version + model | |
128128
//! | signrawtransactionwithkey | version + model | |
129129
//! | testmempoolaccept | version + model | |

types/src/v25/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
//! | finalizepsbt | version + model | |
125125
//! | fundrawtransaction | version + model | |
126126
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
127-
//! | joinpsbts | version + model | UNTESTED |
127+
//! | joinpsbts | version + model | |
128128
//! | sendrawtransaction | version + model | |
129129
//! | signrawtransactionwithkey | version + model | |
130130
//! | testmempoolaccept | version + model | |

types/src/v26/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
//! | finalizepsbt | version + model | |
132132
//! | fundrawtransaction | version + model | |
133133
//! | getrawtransaction | version + model | Includes additional 'verbose' type |
134-
//! | joinpsbts | version + model | UNTESTED |
134+
//! | joinpsbts | version + model | |
135135
//! | sendrawtransaction | version + model | |
136136
//! | signrawtransactionwithkey | version + model | |
137137
//! | submitpackage | version + model | |

0 commit comments

Comments
 (0)