Skip to content

Commit a71ad20

Browse files
committed
integration_test: Add explicit types everywhere
Fixes rust-bitcoin#612
1 parent 2a3a3b8 commit a71ad20

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

integration_test/tests/generating.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn generating__invalidate_block() {
110110
node.client.get_best_block_hash().expect("getbestblockhash").into_model().unwrap().0;
111111
assert_ne!(old_best_block, new_best_block);
112112

113-
node.client.invalidate_block(new_best_block).expect("invalidateblock");
113+
let _: () = node.client.invalidate_block(new_best_block).expect("invalidateblock");
114114

115115
let json: GetBestBlockHash = node.client.get_best_block_hash().expect("getbestblockhash");
116116
let model: Result<mtype::GetBestBlockHash, hex::HexToArrayError> = json.into_model();

integration_test/tests/hidden.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ fn hidden__reconsider_block() {
252252
"height should decrease by 1 after invalidating the tip block"
253253
);
254254

255-
node.client.reconsider_block(tip_before).expect("reconsiderblock");
255+
let _: () = node.client.reconsider_block(tip_before).expect("reconsiderblock");
256256

257257
let tip_after_reconsider =
258258
node.client.best_block_hash().expect("bestblockhash after reconsider");

integration_test/tests/wallet.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,9 +837,10 @@ fn wallet__list_wallets__modelled() {
837837
node.client.create_wallet(wallet_2).expect("createwallet w2");
838838

839839
let json: ListWallets = node.client.list_wallets().expect("listwallets");
840+
let model: mtype::ListWallets = json.into_model();
840841

841-
assert!(json.0.iter().any(|w| w == wallet_1));
842-
assert!(json.0.iter().any(|w| w == wallet_2));
842+
assert!(model.0.iter().any(|w| w == wallet_1));
843+
assert!(model.0.iter().any(|w| w == wallet_2));
843844
}
844845

845846
#[test]
@@ -1182,7 +1183,8 @@ fn create_load_unload_wallet() {
11821183
let node = BitcoinD::with_wallet(Wallet::None, &[]);
11831184

11841185
let wallet = format!("wallet-{}", rand::random::<u32>()).to_string();
1185-
node.client.create_wallet(&wallet).expect("failed to create wallet");
1186+
let json: CreateWallet = node.client.create_wallet(&wallet).expect("createwallet");
1187+
let _: mtype::CreateWallet = json.into_model();
11861188

11871189
// Upto version 20 Core returns null for `unloadwallet`.
11881190
#[cfg(feature = "v20_and_below")]
@@ -1195,7 +1197,8 @@ fn create_load_unload_wallet() {
11951197
let _: mtype::UnloadWallet = json.into_model();
11961198
}
11971199

1198-
let _: LoadWallet = node.client.load_wallet(&wallet).expect("loadwallet");
1200+
let json: LoadWallet = node.client.load_wallet(&wallet).expect("loadwallet");
1201+
let _: mtype::LoadWallet = json.into_model();
11991202
}
12001203

12011204
#[test]

0 commit comments

Comments
 (0)