Use a boost::optional for nCachedBranchId

This enables us to distinguish between it being unset vs. being set to zero.
This commit is contained in:
Jack Grigg
2018-02-06 22:42:18 +00:00
parent 149d69e36b
commit 828940b163
3 changed files with 36 additions and 18 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pindexNew->nNonce = diskindex.nNonce;
pindexNew->nSolution = diskindex.nSolution;
pindexNew->nStatus = diskindex.nStatus;
pindexNew->nConsensusBranchId = diskindex.nConsensusBranchId;
pindexNew->nCachedBranchId = diskindex.nCachedBranchId;
pindexNew->nTx = diskindex.nTx;
pindexNew->nSproutValue = diskindex.nSproutValue;