diff --git a/integration_test/tests/mining.rs b/integration_test/tests/mining.rs index 0875e539..7764345c 100644 --- a/integration_test/tests/mining.rs +++ b/integration_test/tests/mining.rs @@ -60,7 +60,7 @@ fn mining__get_mining_info() { fn mining__get_network_hash_ps() { let node = BitcoinD::with_wallet(Wallet::Default, &[]); node.fund_wallet(); - let _ = node.client.get_network_hash_ps().expect("rpc"); + let _: f64 = node.client.get_network_hash_ps().expect("rpc"); } #[test] diff --git a/types/src/v17/mod.rs b/types/src/v17/mod.rs index 0ef6aa0a..c2c546de 100644 --- a/types/src/v17/mod.rs +++ b/types/src/v17/mod.rs @@ -83,7 +83,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! diff --git a/types/src/v18/mod.rs b/types/src/v18/mod.rs index 142ea608..135df268 100644 --- a/types/src/v18/mod.rs +++ b/types/src/v18/mod.rs @@ -84,7 +84,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v19/mod.rs b/types/src/v19/mod.rs index 4d05bdd1..59a116a2 100644 --- a/types/src/v19/mod.rs +++ b/types/src/v19/mod.rs @@ -84,7 +84,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v20/mod.rs b/types/src/v20/mod.rs index 7124547f..c97ead88 100644 --- a/types/src/v20/mod.rs +++ b/types/src/v20/mod.rs @@ -85,7 +85,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v21/mod.rs b/types/src/v21/mod.rs index 24fcf809..25420419 100644 --- a/types/src/v21/mod.rs +++ b/types/src/v21/mod.rs @@ -86,7 +86,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v22/mod.rs b/types/src/v22/mod.rs index bbf776ba..59588e74 100644 --- a/types/src/v22/mod.rs +++ b/types/src/v22/mod.rs @@ -86,7 +86,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v23/mod.rs b/types/src/v23/mod.rs index b8e21fa3..b7625da9 100644 --- a/types/src/v23/mod.rs +++ b/types/src/v23/mod.rs @@ -77,7 +77,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v24/mod.rs b/types/src/v24/mod.rs index 0cad2955..aa17f985 100644 --- a/types/src/v24/mod.rs +++ b/types/src/v24/mod.rs @@ -78,7 +78,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v25/mod.rs b/types/src/v25/mod.rs index 05881274..c1a789c6 100644 --- a/types/src/v25/mod.rs +++ b/types/src/v25/mod.rs @@ -79,7 +79,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | //! | submitheader | returns nothing | | diff --git a/types/src/v26/mod.rs b/types/src/v26/mod.rs index 479f2aca..9729d737 100644 --- a/types/src/v26/mod.rs +++ b/types/src/v26/mod.rs @@ -83,7 +83,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | getprioritisedtransactions | version + model | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | diff --git a/types/src/v27/mod.rs b/types/src/v27/mod.rs index e6a66291..cd634ef4 100644 --- a/types/src/v27/mod.rs +++ b/types/src/v27/mod.rs @@ -83,7 +83,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | getprioritisedtransactions | version + model | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | diff --git a/types/src/v28/mod.rs b/types/src/v28/mod.rs index e5342297..8f015ef0 100644 --- a/types/src/v28/mod.rs +++ b/types/src/v28/mod.rs @@ -83,7 +83,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | getprioritisedtransactions | version + model | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | diff --git a/types/src/v29/mod.rs b/types/src/v29/mod.rs index f590dcce..28dcf487 100644 --- a/types/src/v29/mod.rs +++ b/types/src/v29/mod.rs @@ -84,7 +84,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | getprioritisedtransactions | version + model | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | diff --git a/types/src/v30/mod.rs b/types/src/v30/mod.rs index 85ec7d4b..7f11cf3f 100644 --- a/types/src/v30/mod.rs +++ b/types/src/v30/mod.rs @@ -87,7 +87,7 @@ //! |:-----------------------------------|:---------------:|:--------------------------------------:| //! | getblocktemplate | version + model | | //! | getmininginfo | version + model | | -//! | getnetworkhashps | returns boolean | | +//! | getnetworkhashps | returns numeric | | //! | getprioritisedtransactions | version + model | | //! | prioritisetransaction | returns boolean | | //! | submitblock | returns nothing | | diff --git a/verify/src/method/v18.rs b/verify/src/method/v18.rs index c32df830..16bd40bf 100644 --- a/verify/src/method/v18.rs +++ b/verify/src/method/v18.rs @@ -48,7 +48,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v19.rs b/verify/src/method/v19.rs index f4f18693..89494bd0 100644 --- a/verify/src/method/v19.rs +++ b/verify/src/method/v19.rs @@ -48,7 +48,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v20.rs b/verify/src/method/v20.rs index 0bc05ae9..29a7c839 100644 --- a/verify/src/method/v20.rs +++ b/verify/src/method/v20.rs @@ -49,7 +49,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v21.rs b/verify/src/method/v21.rs index 8f736608..01e6545d 100644 --- a/verify/src/method/v21.rs +++ b/verify/src/method/v21.rs @@ -50,7 +50,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v22.rs b/verify/src/method/v22.rs index 7bd79055..08cf7f8b 100644 --- a/verify/src/method/v22.rs +++ b/verify/src/method/v22.rs @@ -50,7 +50,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v23.rs b/verify/src/method/v23.rs index 1f7ba624..175b9b81 100644 --- a/verify/src/method/v23.rs +++ b/verify/src/method/v23.rs @@ -48,7 +48,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v24.rs b/verify/src/method/v24.rs index 66055981..d697eb6d 100644 --- a/verify/src/method/v24.rs +++ b/verify/src/method/v24.rs @@ -49,7 +49,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v25.rs b/verify/src/method/v25.rs index 2566594a..2a47df5d 100644 --- a/verify/src/method/v25.rs +++ b/verify/src/method/v25.rs @@ -50,7 +50,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_bool("prioritisetransaction", "prioritise_transaction"), Method::new_nothing("submitblock", "submit_block"), Method::new_nothing("submitheader", "submit_header"), diff --git a/verify/src/method/v26.rs b/verify/src/method/v26.rs index 771c6972..7d3f3264 100644 --- a/verify/src/method/v26.rs +++ b/verify/src/method/v26.rs @@ -54,7 +54,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_modelled( "getprioritisedtransactions", "GetPrioritisedTransactions", diff --git a/verify/src/method/v27.rs b/verify/src/method/v27.rs index 5497566b..5a3b5ab4 100644 --- a/verify/src/method/v27.rs +++ b/verify/src/method/v27.rs @@ -54,7 +54,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_modelled( "getprioritisedtransactions", "GetPrioritisedTransactions", diff --git a/verify/src/method/v28.rs b/verify/src/method/v28.rs index 51174e1e..32fea3d6 100644 --- a/verify/src/method/v28.rs +++ b/verify/src/method/v28.rs @@ -54,7 +54,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_modelled( "getprioritisedtransactions", "GetPrioritisedTransactions", diff --git a/verify/src/method/v29.rs b/verify/src/method/v29.rs index 79343d99..9895e498 100644 --- a/verify/src/method/v29.rs +++ b/verify/src/method/v29.rs @@ -59,7 +59,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_modelled( "getprioritisedtransactions", "GetPrioritisedTransactions", diff --git a/verify/src/method/v30.rs b/verify/src/method/v30.rs index 92a36a7d..bc82ccad 100644 --- a/verify/src/method/v30.rs +++ b/verify/src/method/v30.rs @@ -62,7 +62,7 @@ pub const METHODS: &[Method] = &[ // mining Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"), Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"), - Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_numeric("getnetworkhashps", "get_network_hashes_per_second"), Method::new_modelled( "getprioritisedtransactions", "GetPrioritisedTransactions",