Skip to content

Commit f9f907a

Browse files
committed
Merge #244: Implement abortrescan method and test
9a24cfd Format code (GideonBature) 5decd11 Implement abortrescan method and test (GideonBature) Pull request description: The JSON-RPC method `abortrescan` does return a type. We want to test this to catch any changes in behavior in future Core versions. This PR adds a client function that errors if the return value is anything other than the type it returns, along with an integration test that calls this function. Ref: [#116](#116) ACKs for top commit: jamillambert: ACK 9a24cfd tcharding: ACK 9a24cfd Tree-SHA512: 1c5c58fc482691e7354d5ea61398b7bf37bae3b16578305d70ac8eb57c222c57102d12da7ab340b59faa49f2e1977259cadaa519917137b646bb0a64f03df54c
2 parents 1a524eb + 9a24cfd commit f9f907a

File tree

42 files changed

+128
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+128
-88
lines changed

client/src/client_sync/v17/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ crate::impl_client_v17__verify_message!();
109109

110110
// == Wallet ==
111111
crate::impl_client_v17__abandon_transaction!();
112+
crate::impl_client_v17__abort_rescan!();
112113
crate::impl_client_v17__add_multisig_address!();
113114
crate::impl_client_v17__bump_fee!();
114115
crate::impl_client_v17__create_wallet!();

client/src/client_sync/v17/wallet.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ macro_rules! impl_client_v17__abandon_transaction {
2525
};
2626
}
2727

28+
/// Implements Bitcoin Core JSON-RPC API method `abortrescan`.
29+
#[macro_export]
30+
macro_rules! impl_client_v17__abort_rescan {
31+
() => {
32+
impl Client {
33+
pub fn abort_rescan(&self) -> Result<AbortRescan> { self.call("abortrescan", &[]) }
34+
}
35+
};
36+
}
37+
2838
/// Implements Bitcoin Core JSON-RPC API method `addmultisigaddress`.
2939
#[macro_export]
3040
macro_rules! impl_client_v17__add_multisig_address {

client/src/client_sync/v18/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ crate::impl_client_v17__verify_message!();
123123

124124
// == Wallet ==
125125
crate::impl_client_v17__abandon_transaction!();
126+
crate::impl_client_v17__abort_rescan!();
126127
crate::impl_client_v17__add_multisig_address!();
127128
crate::impl_client_v17__bump_fee!();
128129
crate::impl_client_v17__create_wallet!();

client/src/client_sync/v19/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ crate::impl_client_v17__verify_message!();
118118

119119
// == Wallet ==
120120
crate::impl_client_v17__abandon_transaction!();
121+
crate::impl_client_v17__abort_rescan!();
121122
crate::impl_client_v17__add_multisig_address!();
122123
crate::impl_client_v17__bump_fee!();
123124
crate::impl_client_v17__create_wallet!();

client/src/client_sync/v20/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ crate::impl_client_v17__verify_message!();
115115

116116
// == Wallet ==
117117
crate::impl_client_v17__abandon_transaction!();
118+
crate::impl_client_v17__abort_rescan!();
118119
crate::impl_client_v17__add_multisig_address!();
119120
crate::impl_client_v17__bump_fee!();
120121
crate::impl_client_v17__create_wallet!();

client/src/client_sync/v21/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ crate::impl_client_v17__verify_message!();
117117

118118
// == Wallet ==
119119
crate::impl_client_v17__abandon_transaction!();
120+
crate::impl_client_v17__abort_rescan!();
120121
crate::impl_client_v17__add_multisig_address!();
121122
crate::impl_client_v17__bump_fee!();
122123
crate::impl_client_v17__create_wallet!();

client/src/client_sync/v22/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ crate::impl_client_v17__verify_message!();
117117

118118
// == Wallet ==
119119
crate::impl_client_v17__abandon_transaction!();
120+
crate::impl_client_v17__abort_rescan!();
120121
crate::impl_client_v17__add_multisig_address!();
121122
crate::impl_client_v17__bump_fee!();
122123
crate::impl_client_v17__create_wallet!();

client/src/client_sync/v23/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ crate::impl_client_v17__verify_message!();
119119

120120
// == Wallet ==
121121
crate::impl_client_v17__abandon_transaction!();
122+
crate::impl_client_v17__abort_rescan!();
122123
crate::impl_client_v17__add_multisig_address!();
123124
crate::impl_client_v17__bump_fee!();
124125
crate::impl_client_v23__create_wallet!();

client/src/client_sync/v24/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ crate::impl_client_v17__verify_message!();
116116

117117
// == Wallet ==
118118
crate::impl_client_v17__abandon_transaction!();
119+
crate::impl_client_v17__abort_rescan!();
119120
crate::impl_client_v17__add_multisig_address!();
120121
crate::impl_client_v17__bump_fee!();
121122
crate::impl_client_v23__create_wallet!();

client/src/client_sync/v25/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ crate::impl_client_v17__verify_message!();
116116

117117
// == Wallet ==
118118
crate::impl_client_v17__abandon_transaction!();
119+
crate::impl_client_v17__abort_rescan!();
119120
crate::impl_client_v17__add_multisig_address!();
120121
crate::impl_client_v17__bump_fee!();
121122
crate::impl_client_v23__create_wallet!();

0 commit comments

Comments
 (0)