Browse Source
It has no business in `rpcserver.h`. Define it in the interface header of the implementation unit `rpcblockchain` where it is defined. Also modernize the signature to: double GetDifficulty(const CBlockIndex* blockindex = nullptr); (remove `extern`, replace `NULL` with `nullptr`)0.15
Wladimir J. van der Laan
8 years ago
6 changed files with 25 additions and 8 deletions
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) 2017 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_RPC_BLOCKCHAIN_H |
||||
#define BITCOIN_RPC_BLOCKCHAIN_H |
||||
|
||||
class CBlockIndex; |
||||
|
||||
/**
|
||||
* Get the difficulty of the net wrt to the given block index, or the chain tip if |
||||
* not provided. |
||||
* |
||||
* @return A floating point number that is a multiple of the main net minimum |
||||
* difficulty (4295032833 hashes). |
||||
*/ |
||||
double GetDifficulty(const CBlockIndex* blockindex = nullptr); |
||||
|
||||
#endif |
||||
|
Loading…
Reference in new issue