Skip to content

Commit

Permalink
integration: test gettxoutsetinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharding committed Dec 19, 2024
1 parent 4120c69 commit d6bfd70
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/client_sync/v17/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ macro_rules! impl_client_v17__gettxoutproof {
macro_rules! impl_client_v17__gettxoutsetinfo {
() => {
impl Client {
pub fn get_tx_out_set_info(&self) -> Result<GetTxOut> {
pub fn get_tx_out_set_info(&self) -> Result<GetTxOutSetInfo> {
self.call("gettxoutsetinfo", &[])
}
}
Expand Down
1 change: 1 addition & 0 deletions client/src/client_sync/v18.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ crate::impl_client_v17__getmempoolinfo!();
crate::impl_client_v17__getrawmempool!();
crate::impl_client_v17__gettxout!();
crate::impl_client_v17__gettxoutproof!();
crate::impl_client_v17__gettxoutsetinfo!();
crate::impl_client_v17__verifytxoutproof!();

// == Control ==
Expand Down
12 changes: 10 additions & 2 deletions integration_test/tests/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,16 @@ fn get_tx_out() {
}

#[test]
#[cfg(feature = "TODO")]
fn get_tx_out_set_info() { todo!() }
fn get_tx_out_set_info() {
let node = Node::new_with_default_wallet();
node.fund_wallet();
let (_address, _tx) = node.create_mined_transaction();

// Test the type and into model conversion code.
let json = node.client.get_tx_out_set_info().expect("gettxoutsetinfo");
let _ = json.into_model().expect("into_model");

}

// Implicitly tests the omitted method `gettxoutproof` as well.
#[test]
Expand Down
2 changes: 1 addition & 1 deletion types/src/v17/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
//! | getrawmempool | done |
//! | gettxout | done |
//! | gettxoutproof | omitted |
//! | gettxoutsetinfo | done (untested) |
//! | gettxoutsetinfo | done |
//! | preciousblock | omitted |
//! | pruneblockchain | omitted |
//! | savemempool | omitted |
Expand Down
2 changes: 1 addition & 1 deletion types/src/v18/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
//! | getrawmempool | done |
//! | gettxout | done |
//! | gettxoutproof | omitted |
//! | gettxoutsetinfo | done (untested) |
//! | gettxoutsetinfo | done |
//! | preciousblock | omitted |
//! | pruneblockchain | omitted |
//! | savemempool | omitted |
Expand Down

0 comments on commit d6bfd70

Please sign in to comment.