This fixes a bug in ScanQuorums which made it return quorums which were not
mined at the time of pindexStart. This was due to quorumHashes being based
on older blocks (the phase=0 block) which are ancestors of pindexStart even
if the commitment was actually mined in a later block.
GetMinedAndActiveCommitmentsUntilBlock is also going to be used for quorum
commitment merkle roots in CCbTx.
This also removes GetFirstMinedQuorumHash as it's not needed anymore.
This iterator allows merged iteration of the key/values from the parent and
the not-yet-committed key/values from the transaction. This also works for
nested transactions (as used in CEvoDB).
It's interface mimics CDBIterator.
...instead of comparing by using the keys < operator.
There are 2 reasons for this:
1. This better mimics the behavior of CDBWrapper. Otherwise there is
a chance of discrepancy when it comes to key equality.
2. Next commit will introduce CDBTransactionIterator, which relies on
CDBTransaction and CDBWrapper being compatible in the way keys are
compared.
We'll later need this method to calculate merkle roots outside of CBlock.
I'd like to avoid moving this code outside of CBlock as it might later
conflict with Bitcoin backports.
This is a hackish version of https://github.com/dashpay/dash/pull/2824,
meant for 0.13.x only. The reason for this hackish version is that the
code has diverged quite a bit and its not worth the effort to backport
the hardening code.
Even though 0.13.x included a lot of fixes for sporks handling and syncing,
I still feel more safe with hardening the spork15 block height. If
something goes wrong with spork syncing (e.g. its slower then the first
DIP2/3 block arrives), the whole sync process will fail otherwise.
Even if its a TX type which we don't want in merkle blocks. Wrongfully
omitting the pushes causes invalid partial merkle trees, which in turn
causes SPV nodes to ban us.
Even if its a TX type which we don't want in merkle blocks. Wrongfully
omitting the pushes causes invalid partial merkle trees, which in turn
causes SPV nodes to ban us.
* Update immer library to current master (0a718d2d76bab6ebdcf43de943bd6c7d2dbfe2f9)
* Temporary fix for alignof(std::max_align_t) on MinGW 32bit builds
See https://github.com/arximboldi/immer/issues/78