Split getPassiveDelegationStatus out of getPoolStatus so that the execution paths for getPoolInfoV2 and getPassiveDelegationInfoV2 are disentangled.
Update account hashing to include the cooldown queue.
Update the account structure to include the cooldown queue.
Revise the computation of account available amounts (it is now protocol-version specific).
Epoch transition handling:
bsoProcessPendingChanges is only available before P7 (versions that do not support flexible cooldown).
bsoProcessCooldowns removes cooldowns that have expired and then moves pre-cooldowns into cooldown.
bsoProcessPrePreCooldowns moves pre-pre-cooldowns into pre-cooldown.
Change payday handling so to call bsoProcessCooldowns instead of bsoProcessPendingChanges from P7 (via paydayHandleCooldowns)
On snapshot epoch, pending changes are no longer accounted for (from P7) when snapshotting since they will always be NoChange. Instead bsoProcessPrePreCooldowns is called.
The NewReleaseSchedule structure is reused to track cooldown expiries.
...
Checklist
[ ] My code follows the style of this project.
[ ] The code compiles without warnings.
[ ] I have performed a self-review of the changes.
[ ] I have documented my code, in particular the intent of the
hard-to-understand areas.
Purpose
Closes #1142 #1145 #1146 #1147 #1148 #1176 #1177
Implement cooldown changes in the node.
Changes
getPassiveDelegationStatus
out ofgetPoolStatus
so that the execution paths forgetPoolInfoV2
andgetPassiveDelegationInfoV2
are disentangled.bsoProcessPendingChanges
is only available before P7 (versions that do not support flexible cooldown).bsoProcessCooldowns
removes cooldowns that have expired and then moves pre-cooldowns into cooldown.bsoProcessPrePreCooldowns
moves pre-pre-cooldowns into pre-cooldown.bsoProcessCooldowns
instead ofbsoProcessPendingChanges
from P7 (viapaydayHandleCooldowns
)NoChange
. InsteadbsoProcessPrePreCooldowns
is called.NewReleaseSchedule
structure is reused to track cooldown expiries.Checklist