aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-03-18 08:48:32 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-03-18 08:50:43 +0100
commit73b7eb501e6498e911321131e58ae7fbec6bc5ed (patch)
tree3d14528d1bd3b9db17c643958085894c5a497694 /src/main.h
parentf034bced269c4859809d320dcfbdc4b008191b85 (diff)
parent8c74cedef53ab791ed333f25794f8b9d2e9f51aa (diff)
Merge #7575: Minimal BIP9 implementation
8c74ced RPC test for BIP9 warning logic (Suhas Daftuar) 7870deb Test versionbits deployments (Suhas Daftuar) 532cbb2 Add testing of ComputeBlockVersion (Suhas Daftuar) d23f6c6 Softfork status report in RPC (Pieter Wuille) 732e774 Versionbits tests (Pieter Wuille) 6851107 BIP9 Implementation (Pieter Wuille)
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 85ec60ac61..6936b5379a 100644
--- a/src/main.h
+++ b/src/main.h
@@ -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.