Improve ntz detection and serialize to disk

This commit is contained in:
Jonathan "Duke" Leto
2019-08-21 06:43:41 -07:00
parent d03d774c18
commit 3b49c1d256
2 changed files with 17 additions and 4 deletions

View File

@@ -260,6 +260,10 @@ public:
//! Note: in a potential headers-first mode, this number cannot be relied upon
unsigned int nTx;
//! Number of notarization transactions in this block.
unsigned int nNotarizations;
// TODO: convert block-stats to unsigned int ?
//! (memory only) Number of payments (shielded or transparent) in the block
//! up to and including this block. One transaction can contain one or more
//! payments. This stat allows us to calculate ratios of shielded/transparent
@@ -310,6 +314,9 @@ public:
//! Change to 64-bit type when necessary; won't happen before 2030
unsigned int nChainTx;
//! Number of notarization transactions in this chain
int64_t nChainNotarizations;
//! (memory only) Number of payments (shielded or transparent) in the chain
//! up to and including this block. One transaction can contain one or more
//! payments. This stat allows us to calculate ratios of shielded/transparent
@@ -615,8 +622,7 @@ public:
READWRITE(VARINT(nStatus));
READWRITE(VARINT(nTx));
// These values only serialized when -zindex=1
//if (fZindex != GetBoolArg("-zindex", false)) {
// These values only serialized when -zindex enabled
if(fZindex) {
READWRITE(VARINT(nShieldedTx));
READWRITE(VARINT(nShieldingTx));
@@ -627,6 +633,8 @@ public:
READWRITE(VARINT(nShieldingPayments));
READWRITE(VARINT(nDeshieldingPayments));
READWRITE(VARINT(nFullyShieldedPayments));
READWRITE(VARINT(nChainNotarizations));
}
if (nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))