diff --git a/src/utiltest.cpp b/src/utiltest.cpp index c8bf6d506..8f1e64b27 100644 --- a/src/utiltest.cpp +++ b/src/utiltest.cpp @@ -167,8 +167,6 @@ const Consensus::Params& ActivateSapling() { void DeactivateSapling() { UpdateNetworkUpgradeParameters(Consensus::UPGRADE_SAPLING, Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT); UpdateNetworkUpgradeParameters(Consensus::UPGRADE_OVERWINTER, Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT); - // Consider: Should we be doing the following? - // SelectParams(CBaseChainParams::MAIN); } libzcash::SaplingExtendedSpendingKey GetMasterSaplingSpendingKey() { diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 08d462356..3fb38688c 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -300,7 +300,7 @@ double benchmark_try_decrypt_sprout_notes(size_t nAddrs) double benchmark_try_decrypt_sapling_notes(size_t nAddrs) { // Set params - auto consensusParams = ActivateSapling(); + auto consensusParams = Params().GetConsensus(); auto masterKey = GetMasterSaplingSpendingKey(); @@ -319,12 +319,7 @@ double benchmark_try_decrypt_sapling_notes(size_t nAddrs) struct timeval tv_start; timer_start(tv_start); auto saplingNoteDataAndAddressesToAdd = wallet.FindMySaplingNotes(tx); - double tv_stop = timer_stop(tv_start); - - // Revert to default - DeactivateSapling(); - - return tv_stop; + return timer_stop(tv_start); } CWalletTx CreateSproutTxWithNoteData(const libzcash::SproutSpendingKey& sk) { @@ -362,7 +357,7 @@ CWalletTx CreateSaplingTxWithNoteData(const Consensus::Params& consensusParams, double benchmark_increment_note_witnesses(size_t nTxs) { - auto consensusParams = ActivateSapling(); + auto consensusParams = Params().GetConsensus(); CWallet wallet; SproutMerkleTree sproutTree; @@ -418,11 +413,7 @@ double benchmark_increment_note_witnesses(size_t nTxs) struct timeval tv_start; timer_start(tv_start); wallet.ChainTip(&index2, &block2, sproutTree, saplingTree, true); - double tv_stop = timer_stop(tv_start); - - DeactivateSapling(); - - return tv_stop; + return timer_stop(tv_start); } // Fake the input of a given block