From 1d554b1d45f6ab5f65adc66ef44a258b92f75663 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 6 Feb 2015 10:42:01 -0800 Subject: Raise version of created blocks, and enforce DERSIG in mempool --- src/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core.h') diff --git a/src/core.h b/src/core.h index 6a0286f9d..b020a365e 100644 --- a/src/core.h +++ b/src/core.h @@ -364,7 +364,7 @@ class CBlockHeader { public: // header - static const int CURRENT_VERSION=2; + static const int CURRENT_VERSION=3; int nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; -- cgit v1.2.3 From 096d657914ea0c3e191ed1da21dd7e9296254384 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Fri, 7 Aug 2015 14:02:34 +0200 Subject: Implement [CBlock|CBlockIndex]::GetBaseVersion() - nVersion & 0xff to easily compare versions without aux data - change implementations checking nVersion throughout main.ccp --- src/core.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core.h') diff --git a/src/core.h b/src/core.h index b020a365e..ae1e463c7 100644 --- a/src/core.h +++ b/src/core.h @@ -33,6 +33,7 @@ static const int BLOCK_VERSION_DEFAULT = (1 << 0); static const int BLOCK_VERSION_AUXPOW = (1 << 8); static const int BLOCK_VERSION_CHAIN_START = (1 << 16); static const int BLOCK_VERSION_CHAIN_END = (1 << 30); +static const int BLOCK_VERSION_BASE_MASK = 0x000000ff; // DogeCoin aux chain ID = 0x0062 (98) static const int AUXPOW_CHAIN_ID = 0x0062; @@ -396,6 +397,12 @@ public: return nVersion / BLOCK_VERSION_CHAIN_START; } + // base block version without auxpow chain + int GetBaseVersion() const + { + return nVersion & BLOCK_VERSION_BASE_MASK; + } + void SetAuxPow(CAuxPow* pow); void SetNull() -- cgit v1.2.3