Skip to content

client: rename all macros to have an underscore between words #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions client/src/client_sync/v17/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/// Implements Bitcoin Core JSON-RPC API method `getblockchaininfo`
#[macro_export]
macro_rules! impl_client_v17__getblockchaininfo {
macro_rules! impl_client_v17__get_blockchain_info {
() => {
impl Client {
pub fn get_blockchain_info(&self) -> Result<GetBlockchainInfo> {
Expand All @@ -23,7 +23,7 @@ macro_rules! impl_client_v17__getblockchaininfo {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/// Implements Bitcoin Core JSON-RPC API method `verifytxoutproof`
#[macro_export]
macro_rules! impl_client_v17__verifytxoutproof {
macro_rules! impl_client_v17__verify_tx_out_proof {
() => {
impl Client {
// `proof` is the hex-encoded proof generated by `gettxoutproof`.
Expand Down
2 changes: 1 addition & 1 deletion client/src/client_sync/v17/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/// Implements Bitcoin Core JSON-RPC API method `getmemoryinfo`.
#[macro_export]
macro_rules! impl_client_v17__getmemoryinfo {
macro_rules! impl_client_v17__get_memory_info {
() => {
impl Client {
pub fn get_memory_info(&self) -> Result<GetMemoryInfoStats> {
Expand Down
2 changes: 1 addition & 1 deletion client/src/client_sync/v17/generating.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/// Implements Bitcoin Core JSON-RPC API method `generatetoaddress`
#[macro_export]
macro_rules! impl_client_v17__generatetoaddress {
macro_rules! impl_client_v17__generate_to_address {
() => {
impl Client {
pub fn generate_to_address(
Expand Down
10 changes: 5 additions & 5 deletions client/src/client_sync/v17/mining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/// Implements Bitcoin Core JSON-RPC API method `getblocktemplate`
#[macro_export]
macro_rules! impl_client_v17__getblocktemplate {
macro_rules! impl_client_v17__get_block_template {
() => {
impl Client {
pub fn get_block_template(
Expand All @@ -26,7 +26,7 @@ macro_rules! impl_client_v17__getblocktemplate {

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

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

/// Implements Bitcoin Core JSON-RPC API method `prioritisetransaction`
#[macro_export]
macro_rules! impl_client_v17__prioritisetransaction {
macro_rules! impl_client_v17__prioritise_transaction {
() => {
impl Client {
pub fn prioritise_transaction(
Expand All @@ -65,7 +65,7 @@ macro_rules! impl_client_v17__prioritisetransaction {

/// Implements Bitcoin Core JSON-RPC API method `submitblock`
#[macro_export]
macro_rules! impl_client_v17__submitblock {
macro_rules! impl_client_v17__submit_block {
() => {
impl Client {
pub fn submit_block(&self, block: &Block) -> Result<()> {
Expand Down
Loading