Skip to content

Commit 475e449

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 475e449

File tree

13 files changed

+30
-12
lines changed

13 files changed

+30
-12
lines changed

integration_test/tests/raw_transactions.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,24 @@ fn raw_transactions__get_raw_transaction__modelled() {
309309

310310
}
311311

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

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)