Merge #7575: Minimal BIP9 implementation
8c74cedRPC test for BIP9 warning logic (Suhas Daftuar)7870debTest versionbits deployments (Suhas Daftuar)532cbb2Add testing of ComputeBlockVersion (Suhas Daftuar)d23f6c6Softfork status report in RPC (Pieter Wuille)732e774Versionbits tests (Pieter Wuille)6851107BIP9 Implementation (Pieter Wuille)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "net.h"
|
||||
#include "script/script_error.h"
|
||||
#include "sync.h"
|
||||
#include "versionbits.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
@@ -290,6 +291,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
/** Convert CValidationState to a human-readable message for logging */
|
||||
std::string FormatStateMessage(const CValidationState &state);
|
||||
|
||||
/** Get the BIP9 state for a given deployment at the current tip. */
|
||||
ThresholdState VersionBitsTipState(const Consensus::Params& params, Consensus::DeploymentPos pos);
|
||||
|
||||
struct CNodeStateStats {
|
||||
int nMisbehavior;
|
||||
int nSyncHeight;
|
||||
@@ -547,6 +551,11 @@ extern CBlockTreeDB *pblocktree;
|
||||
*/
|
||||
int GetSpendHeight(const CCoinsViewCache& inputs);
|
||||
|
||||
/**
|
||||
* Determine what nVersion a new block should use.
|
||||
*/
|
||||
int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params);
|
||||
|
||||
/** Reject codes greater or equal to this can be returned by AcceptToMemPool
|
||||
* for transactions, to signal internal conditions. They cannot and should not
|
||||
* be sent over the P2P network.
|
||||
|
||||
Reference in New Issue
Block a user