diff options
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.h b/src/main.h index 18d674612f..2646d8f86b 100644 --- a/src/main.h +++ b/src/main.h @@ -34,6 +34,7 @@ class CBlockTreeDB; class CBloomFilter; class CChainParams; class CInv; +class CConnman; class CScriptCheck; class CTxMemPool; class CValidationInterface; @@ -222,7 +223,7 @@ void UnregisterNodeSignals(CNodeSignals& nodeSignals); * @param[out] dbp The already known disk position of pblock, or NULL if not yet stored. * @return True if state.IsValid() */ -bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp); +bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp, CConnman* connman); /** Check whether enough disk space is available for an incoming block */ bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); /** Open a block file (blk?????.dat) */ @@ -240,13 +241,14 @@ bool LoadBlockIndex(); /** Unload database information */ void UnloadBlockIndex(); /** Process protocol messages received from a given node */ -bool ProcessMessages(CNode* pfrom); +bool ProcessMessages(CNode* pfrom, CConnman& connman); /** * Send queued protocol messages to be sent to a give node. * * @param[in] pto The node which we are sending messages to. + * @param[in] connman The connection manager for that node. */ -bool SendMessages(CNode* pto); +bool SendMessages(CNode* pto, CConnman& connman); /** Run an instance of the script checking thread */ void ThreadScriptCheck(); /** Check whether we are doing an initial block download (synchronizing from disk or network) */ @@ -262,7 +264,7 @@ std::string GetWarnings(const std::string& strFor); /** Retrieve a transaction (from memory pool, or from disk, if possible) */ bool GetTransaction(const uint256 &hash, CTransaction &tx, const Consensus::Params& params, uint256 &hashBlock, bool fAllowSlow = false); /** Find the best known block, and make it the tip of the block chain */ -bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, const CBlock* pblock = NULL); +bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, const CBlock* pblock = NULL, CConnman* connman = NULL); CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams); /** |