diff options
| author | Pieter Wuille <[email protected]> | 2016-12-01 15:46:04 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-12-01 16:07:25 -0800 |
| commit | dc6dee41f7cf2ba93fcd0fea7c157e4b2775d439 (patch) | |
| tree | edc231141e3549ce7cf53aa04768dc430b79288f /src/main.h | |
| parent | Merge #9188: Make orphan parent fetching ask for witnesses. (diff) | |
| parent | Document cs_main status when calling into PNB or PNBH (diff) | |
| download | discoin-dc6dee41f7cf2ba93fcd0fea7c157e4b2775d439.tar.xz discoin-dc6dee41f7cf2ba93fcd0fea7c157e4b2775d439.zip | |
Merge #9183: Final Preparation for main.cpp Split
2c8c57e Document cs_main status when calling into PNB or PNBH (Matt Corallo)
58a215c Use ProcessNewBlockHeaders in CMPCTBLOCK processing (Matt Corallo)
a8b936d Use exposed ProcessNewBlockHeaders from ProcessMessages (Matt Corallo)
63fd101 Split ::HEADERS processing into two separate cs_main locks (Matt Corallo)
4a6b1f3 Expose AcceptBlockHeader through main.h (Matt Corallo)
Diffstat (limited to 'src/main.h')
| -rw-r--r-- | src/main.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h index c98ed0572..6b2668e56 100644 --- a/src/main.h +++ b/src/main.h @@ -223,6 +223,8 @@ static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; * Note that we guarantee that either the proof-of-work is valid on pblock, or * (and possibly also) BlockChecked will have been called. * + * Call without cs_main held. + * * @param[in] pblock The block we want to process. * @param[in] fForceProcessing Process this block even if unrequested; used for non-network block sources and whitelisted peers. * @param[out] dbp The already known disk position of pblock, or NULL if not yet stored. @@ -230,6 +232,19 @@ static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; * @return True if state.IsValid() */ bool ProcessNewBlock(const CChainParams& chainparams, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp, bool* fNewBlock); + +/** + * Process incoming block headers. + * + * Call without cs_main held. + * + * @param[in] block The block headers themselves + * @param[out] state This may be set to an Error state if any error occurred processing them + * @param[in] chainparams The params for the chain we want to connect to + * @param[out] ppindex If set, the pointer will be set to point to the last new block index object for the given headers + */ +bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex=NULL); + /** Check whether enough disk space is available for an incoming block */ bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); /** Open a block file (blk?????.dat) */ |