This extends the Storage interface such that undo data is stored together with the corresponding block height. By doing so, we allow implementations to implement a new PruneUndoData function that removes all undo data up to a given height - which can be used to save space when blocks are confirmed many times and unlikely to be detached again.
This is a first step towards implementing #8 - namely the changes necessary to Storage. It prepares the stage for the next step, namely to actually call PruneUndoData and ReleaseUndoData from the Game class if pruning is enabled and blocks have enough confirmations.
This extends the
Storage
interface such that undo data is stored together with the corresponding block height. By doing so, we allow implementations to implement a newPruneUndoData
function that removes all undo data up to a given height - which can be used to save space when blocks are confirmed many times and unlikely to be detached again.This is a first step towards implementing #8 - namely the changes necessary to
Storage
. It prepares the stage for the next step, namely to actually callPruneUndoData
andReleaseUndoData
from theGame
class if pruning is enabled and blocks have enough confirmations.