Bugfix: Use time instead of block height for Sapling key metadata

This commit is contained in:
Jack Grigg
2018-09-11 12:45:25 +01:00
parent b33a7ec46e
commit 94549326c9

View File

@@ -593,9 +593,12 @@ public:
}
// Sapling addresses can't have been used in transactions prior to activation.
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = std::max(
1, // In case a code fork sets Sapling to always be active
params.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight);
if (params.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight == Consensus::NetworkUpgrade::ALWAYS_ACTIVE) {
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = 1;
} else {
// Friday, 26 October 2018 00:00:00 GMT - definitely before Sapling activates
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = 1540512000;
}
return false;
}