AuxPoW RPC commands now return a failure message until the switchover block on the respective
network. Also cleaned up RPC error values to use enum values rather than magic numbers.
Change protocol version so post-AuxPoW clients can refuse to deal with pre-AuxPoW clients.
This mitigates excessive bandwidth usage by pre-AuxPoW clients repeatedly requesting blocks
they don't know how to use.
UpdateTip() was checking block versions against one of two
possible AuxPoW versions. Added consts for version checks and
IsAuxPowVersion(int nVersion) for use with UpdateTip()'s
block version check.
Values for triggering safe mode are time sensitive, and have not been
modified to take into account the differing block times between Bitcoin and
Dogecoin. This patch changes the interval across which a fork must exist to
override any other fork to 6 hours, and increases the number of blocks an
invalid fork must have before it trips safe mode.
This should help mitigate disruption in the 1.7/1.8 hard fork, but miners will
still need to run with -disablesafemode for the preceeding and following 2-3
days to be sure.
MakeCoinbaseWithAux() was incorrectly using << to add a CScript onto a
CScript instead of the + operator. Operators corrected and structure
now more closely reflects coinbase script assembly done elsewhere.
PR #589 caused a condition for testnet difficulty to not match at
a couple of cases pre block 145k leading to issues with -reindex.
This makes the testnet fork hard at block 157500, while retaining
every case before that block.
Previous commit 9e9babb was based on a wrong assumption, actual
CBlockHeader->nVersion for auxpow blocks is
CBlockHeader::CURRENT_VERSION | (AUXPOW_CHAIN_ID
* BLOCK_VERSION_CHAIN_START)
and not BLOCK_VERSION_AUXPOW
Testnet resets difficulty if after 2 minutes no block has been
found. However, this feature was implemented with the condition
to only trigger on blocks where no retargeting is done. Since
the introduction of DigiShield, we retarget at every block,
making this condition never to be matched. This commit removes
that condition.
WARNING: THIS COMMIT HARDFORKS THE DOGECOIN TESTNET!
The main network is not affected by this change.
- remove unused int64_t retargetSpacing
- modulate timespan in an isolated int64_t nModulatedTimespan
- keep nActualTimespan intact, to retain the original value
- compress debug.log output from 5 into 3 lines while retaining
all information.
Cancelling the RPC acceptors can sometimes result in an error about
a bad file descriptor.
As this is the shutdown sequence we need to continue nevertheless,
ignore these errors, log a warning and proceed.
Fixes#4352.