Skip to content

Commit 29cfaf9

Browse files
committed
Merge rust-bitcoin#614: integration_test: Add explicit types everywhere
a71ad20 integration_test: Add explicit types everywhere (Alexey Gradoboev) Pull request description: - adding explicit re-exported types in tests excluding suffixed by _core Fixes rust-bitcoin#612 ACKs for top commit: tcharding: ACK a71ad20 Tree-SHA512: b6cdbe378bdd94bbe1300441127f392956770b32a8e411a2a2963cf0f6360e1de7dea868711e650ee1a7a05ea82f1a58c49f25cb556056697302b5dca58e3de2
2 parents 54aa5df + a71ad20 commit 29cfaf9

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
@@ -245,7 +245,7 @@ fn hidden__reconsider_block() {
245245
"height should decrease by 1 after invalidating the tip block"
246246
);
247247

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

250250
let tip_after_reconsider =
251251
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
@@ -836,9 +836,10 @@ fn wallet__list_wallets__modelled() {
836836
node.client.create_wallet(wallet_2).expect("createwallet w2");
837837

838838
let json: ListWallets = node.client.list_wallets().expect("listwallets");
839+
let model: mtype::ListWallets = json.into_model();
839840

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

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

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

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

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

12001203
#[test]

0 commit comments

Comments
 (0)