Skip to content

Commit 1251249

Browse files
committed
Rename all macros to have underscores
To match the naming convention used in the rest of the repo add an underscore between the words in the macro names. The new names are all taken from the lists in `verify/src/method/`.
1 parent 107e2fa commit 1251249

34 files changed

+1348
-1348
lines changed

client/src/client_sync/v17/blockchain.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
/// Implements Bitcoin Core JSON-RPC API method `getblockchaininfo`
1313
#[macro_export]
14-
macro_rules! impl_client_v17__getblockchaininfo {
14+
macro_rules! impl_client_v17__get_blockchain_info {
1515
() => {
1616
impl Client {
1717
pub fn get_blockchain_info(&self) -> Result<GetBlockchainInfo> {
@@ -23,7 +23,7 @@ macro_rules! impl_client_v17__getblockchaininfo {
2323

2424
/// Implements Bitcoin Core JSON-RPC API method `getbestblockhash`
2525
#[macro_export]
26-
macro_rules! impl_client_v17__getbestblockhash {
26+
macro_rules! impl_client_v17__get_best_block_hash {
2727
() => {
2828
impl Client {
2929
/// Gets the blockhash of the current chain tip.
@@ -41,7 +41,7 @@ macro_rules! impl_client_v17__getbestblockhash {
4141

4242
/// Implements Bitcoin Core JSON-RPC API method `getblock`
4343
#[macro_export]
44-
macro_rules! impl_client_v17__getblock {
44+
macro_rules! impl_client_v17__get_block {
4545
() => {
4646
impl Client {
4747
/// Gets a block by blockhash.
@@ -65,7 +65,7 @@ macro_rules! impl_client_v17__getblock {
6565

6666
/// Implements Bitcoin Core JSON-RPC API method `getblockcount`
6767
#[macro_export]
68-
macro_rules! impl_client_v17__getblockcount {
68+
macro_rules! impl_client_v17__get_block_count {
6969
() => {
7070
impl Client {
7171
pub fn get_block_count(&self) -> Result<GetBlockCount> {
@@ -77,7 +77,7 @@ macro_rules! impl_client_v17__getblockcount {
7777

7878
/// Implements Bitcoin Core JSON-RPC API method `getblockhash`
7979
#[macro_export]
80-
macro_rules! impl_client_v17__getblockhash {
80+
macro_rules! impl_client_v17__get_block_hash {
8181
() => {
8282
impl Client {
8383
pub fn get_block_hash(&self, height: u64) -> Result<GetBlockHash> {
@@ -89,7 +89,7 @@ macro_rules! impl_client_v17__getblockhash {
8989

9090
/// Implements Bitcoin Core JSON-RPC API method `getblockheader`
9191
#[macro_export]
92-
macro_rules! impl_client_v17__getblockheader {
92+
macro_rules! impl_client_v17__get_block_header {
9393
() => {
9494
impl Client {
9595
pub fn get_block_header(&self, hash: &BlockHash) -> Result<GetBlockHeader> {
@@ -109,7 +109,7 @@ macro_rules! impl_client_v17__getblockheader {
109109

110110
/// Implements Bitcoin Core JSON-RPC API method `getblockstats`
111111
#[macro_export]
112-
macro_rules! impl_client_v17__getblockstats {
112+
macro_rules! impl_client_v17__get_block_stats {
113113
() => {
114114
impl Client {
115115
pub fn get_block_stats_by_height(&self, height: u32) -> Result<GetBlockStats> {
@@ -125,7 +125,7 @@ macro_rules! impl_client_v17__getblockstats {
125125

126126
/// Implements Bitcoin Core JSON-RPC API method `getchaintips`
127127
#[macro_export]
128-
macro_rules! impl_client_v17__getchaintips {
128+
macro_rules! impl_client_v17__get_chain_tips {
129129
() => {
130130
impl Client {
131131
pub fn get_chain_tips(&self) -> Result<GetChainTips> { self.call("getchaintips", &[]) }
@@ -135,7 +135,7 @@ macro_rules! impl_client_v17__getchaintips {
135135

136136
/// Implements Bitcoin Core JSON-RPC API method `getchaintxstats`
137137
#[macro_export]
138-
macro_rules! impl_client_v17__getchaintxstats {
138+
macro_rules! impl_client_v17__get_chain_tx_stats {
139139
() => {
140140
impl Client {
141141
pub fn get_chain_tx_stats(&self) -> Result<GetChainTxStats> {
@@ -147,7 +147,7 @@ macro_rules! impl_client_v17__getchaintxstats {
147147

148148
/// Implements Bitcoin Core JSON-RPC API method `getdifficulty`
149149
#[macro_export]
150-
macro_rules! impl_client_v17__getdifficulty {
150+
macro_rules! impl_client_v17__get_difficulty {
151151
() => {
152152
impl Client {
153153
pub fn get_difficulty(&self) -> Result<GetDifficulty> {
@@ -159,7 +159,7 @@ macro_rules! impl_client_v17__getdifficulty {
159159

160160
/// Implements Bitcoin Core JSON-RPC API method `getmempoolancestors`
161161
#[macro_export]
162-
macro_rules! impl_client_v17__getmempoolancestors {
162+
macro_rules! impl_client_v17__get_mempool_ancestors {
163163
() => {
164164
impl Client {
165165
pub fn get_mempool_ancestors(&self, txid: Txid) -> Result<GetMempoolAncestors> {
@@ -179,7 +179,7 @@ macro_rules! impl_client_v17__getmempoolancestors {
179179

180180
/// Implements Bitcoin Core JSON-RPC API method `getmempooldescendants`
181181
#[macro_export]
182-
macro_rules! impl_client_v17__getmempooldescendants {
182+
macro_rules! impl_client_v17__get_mempool_descendants {
183183
() => {
184184
impl Client {
185185
pub fn get_mempool_descendants(&self, txid: Txid) -> Result<GetMempoolDescendants> {
@@ -199,7 +199,7 @@ macro_rules! impl_client_v17__getmempooldescendants {
199199

200200
/// Implements Bitcoin Core JSON-RPC API method `getmempoolentry`
201201
#[macro_export]
202-
macro_rules! impl_client_v17__getmempoolentry {
202+
macro_rules! impl_client_v17__get_mempool_entry {
203203
() => {
204204
impl Client {
205205
pub fn get_mempool_entry(&self, txid: Txid) -> Result<GetMempoolEntry> {
@@ -211,7 +211,7 @@ macro_rules! impl_client_v17__getmempoolentry {
211211

212212
/// Implements Bitcoin Core JSON-RPC API method `getmempoolinfo`
213213
#[macro_export]
214-
macro_rules! impl_client_v17__getmempoolinfo {
214+
macro_rules! impl_client_v17__get_mempool_info {
215215
() => {
216216
impl Client {
217217
pub fn get_mempool_info(&self) -> Result<GetMempoolInfo> {
@@ -223,7 +223,7 @@ macro_rules! impl_client_v17__getmempoolinfo {
223223

224224
/// Implements Bitcoin Core JSON-RPC API method `getrawmempool`
225225
#[macro_export]
226-
macro_rules! impl_client_v17__getrawmempool {
226+
macro_rules! impl_client_v17__get_raw_mempool {
227227
() => {
228228
impl Client {
229229
pub fn get_raw_mempool(&self) -> Result<GetRawMempool> {
@@ -239,7 +239,7 @@ macro_rules! impl_client_v17__getrawmempool {
239239

240240
/// Implements Bitcoin Core JSON-RPC API method `gettxout`
241241
#[macro_export]
242-
macro_rules! impl_client_v17__gettxout {
242+
macro_rules! impl_client_v17__get_tx_out {
243243
() => {
244244
impl Client {
245245
pub fn get_tx_out(&self, txid: Txid, vout: u64) -> Result<GetTxOut> {
@@ -251,7 +251,7 @@ macro_rules! impl_client_v17__gettxout {
251251

252252
/// Implements Bitcoin Core JSON-RPC API method `gettxoutproof`
253253
#[macro_export]
254-
macro_rules! impl_client_v17__gettxoutproof {
254+
macro_rules! impl_client_v17__get_tx_out_proof {
255255
() => {
256256
impl Client {
257257
pub fn get_tx_out_proof(&self, txids: &[Txid]) -> Result<String> {
@@ -263,7 +263,7 @@ macro_rules! impl_client_v17__gettxoutproof {
263263

264264
/// Implements Bitcoin Core JSON-RPC API method `gettxoutsetinfo`
265265
#[macro_export]
266-
macro_rules! impl_client_v17__gettxoutsetinfo {
266+
macro_rules! impl_client_v17__get_tx_out_set_info {
267267
() => {
268268
impl Client {
269269
pub fn get_tx_out_set_info(&self) -> Result<GetTxOutSetInfo> {
@@ -275,7 +275,7 @@ macro_rules! impl_client_v17__gettxoutsetinfo {
275275

276276
/// Implements Bitcoin Core JSON-RPC API method `preciousblock`
277277
#[macro_export]
278-
macro_rules! impl_client_v17__preciousblock {
278+
macro_rules! impl_client_v17__precious_block {
279279
() => {
280280
impl Client {
281281
pub fn precious_block(&self, hash: BlockHash) -> Result<()> {
@@ -291,7 +291,7 @@ macro_rules! impl_client_v17__preciousblock {
291291

292292
/// Implements Bitcoin Core JSON-RPC API method `pruneblockchain`
293293
#[macro_export]
294-
macro_rules! impl_client_v17__pruneblockchain {
294+
macro_rules! impl_client_v17__prune_blockchain {
295295
() => {
296296
impl Client {
297297
/// Instructs the node to prune the blockchain up to a specified height or timestamp.
@@ -304,7 +304,7 @@ macro_rules! impl_client_v17__pruneblockchain {
304304

305305
/// Implements Bitcoin Core JSON-RPC API method `savemempool`
306306
#[macro_export]
307-
macro_rules! impl_client_v17__savemempool {
307+
macro_rules! impl_client_v17__save_mempool {
308308
() => {
309309
impl Client {
310310
pub fn save_mempool(&self) -> Result<()> {
@@ -320,7 +320,7 @@ macro_rules! impl_client_v17__savemempool {
320320

321321
/// Implements Bitcoin Core JSON-RPC API method `verifychain`
322322
#[macro_export]
323-
macro_rules! impl_client_v17__verifychain {
323+
macro_rules! impl_client_v17__verify_chain {
324324
() => {
325325
impl Client {
326326
pub fn verify_chain(&self) -> Result<VerifyChain> { self.call("verifychain", &[]) }
@@ -330,7 +330,7 @@ macro_rules! impl_client_v17__verifychain {
330330

331331
/// Implements Bitcoin Core JSON-RPC API method `verifytxoutproof`
332332
#[macro_export]
333-
macro_rules! impl_client_v17__verifytxoutproof {
333+
macro_rules! impl_client_v17__verify_tx_out_proof {
334334
() => {
335335
impl Client {
336336
// `proof` is the hex-encoded proof generated by `gettxoutproof`.

client/src/client_sync/v17/control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
/// Implements Bitcoin Core JSON-RPC API method `getmemoryinfo`.
1313
#[macro_export]
14-
macro_rules! impl_client_v17__getmemoryinfo {
14+
macro_rules! impl_client_v17__get_memory_info {
1515
() => {
1616
impl Client {
1717
pub fn get_memory_info(&self) -> Result<GetMemoryInfoStats> {

client/src/client_sync/v17/generating.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
/// Implements Bitcoin Core JSON-RPC API method `generatetoaddress`
1313
#[macro_export]
14-
macro_rules! impl_client_v17__generatetoaddress {
14+
macro_rules! impl_client_v17__generate_to_address {
1515
() => {
1616
impl Client {
1717
pub fn generate_to_address(

client/src/client_sync/v17/mining.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
/// Implements Bitcoin Core JSON-RPC API method `getblocktemplate`
1313
#[macro_export]
14-
macro_rules! impl_client_v17__getblocktemplate {
14+
macro_rules! impl_client_v17__get_block_template {
1515
() => {
1616
impl Client {
1717
pub fn get_block_template(
@@ -26,7 +26,7 @@ macro_rules! impl_client_v17__getblocktemplate {
2626

2727
/// Implements Bitcoin Core JSON-RPC API method `getmininginfo`
2828
#[macro_export]
29-
macro_rules! impl_client_v17__getmininginfo {
29+
macro_rules! impl_client_v17__get_mining_info {
3030
() => {
3131
impl Client {
3232
pub fn get_mining_info(&self) -> Result<GetMiningInfo> {
@@ -38,7 +38,7 @@ macro_rules! impl_client_v17__getmininginfo {
3838

3939
/// Implements Bitcoin Core JSON-RPC API method `getnetworkhashps`
4040
#[macro_export]
41-
macro_rules! impl_client_v17__getnetworkhashps {
41+
macro_rules! impl_client_v17__get_network_hashes_per_second {
4242
() => {
4343
impl Client {
4444
pub fn get_network_hash_ps(&self) -> Result<f64> { self.call("getnetworkhashps", &[]) }
@@ -48,7 +48,7 @@ macro_rules! impl_client_v17__getnetworkhashps {
4848

4949
/// Implements Bitcoin Core JSON-RPC API method `prioritisetransaction`
5050
#[macro_export]
51-
macro_rules! impl_client_v17__prioritisetransaction {
51+
macro_rules! impl_client_v17__prioritise_transaction {
5252
() => {
5353
impl Client {
5454
pub fn prioritise_transaction(
@@ -65,7 +65,7 @@ macro_rules! impl_client_v17__prioritisetransaction {
6565

6666
/// Implements Bitcoin Core JSON-RPC API method `submitblock`
6767
#[macro_export]
68-
macro_rules! impl_client_v17__submitblock {
68+
macro_rules! impl_client_v17__submit_block {
6969
() => {
7070
impl Client {
7171
pub fn submit_block(&self, block: &Block) -> Result<()> {

0 commit comments

Comments
 (0)