From d83dbd287a9a9527f5de210b0022d88bc0bb0087 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Sun, 24 Sep 2023 19:30:28 +0700 Subject: [PATCH] fix: fix previous commit with fixes --- src/evo/mnhftx.cpp | 2 +- test/functional/feature_mnehf.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/evo/mnhftx.cpp b/src/evo/mnhftx.cpp index fe95f782da..05d7db3a5b 100644 --- a/src/evo/mnhftx.cpp +++ b/src/evo/mnhftx.cpp @@ -159,7 +159,7 @@ bool CMNHFManager::ProcessBlock(const CBlock& block, const CBlockIndex* const pi } Signals signals = GetSignalsStage(pindex->pprev); if (new_signals.empty()) { - if (fJustCheck) { + if (!fJustCheck) { AddToCache(signals, pindex); } return true; diff --git a/test/functional/feature_mnehf.py b/test/functional/feature_mnehf.py index 3ee7d672d0..1a082395f8 100755 --- a/test/functional/feature_mnehf.py +++ b/test/functional/feature_mnehf.py @@ -103,9 +103,9 @@ class MnehfTest(DashTestFramework): def ensure_tx_is_not_mined(self, tx_id): try: - assert_equal(self.nodes[0].getrawtransaction(tx_id, 1)['height'], -1); + assert_equal(self.nodes[0].getrawtransaction(tx_id, 1)['height'], -1) raise AssertionError("Transaction should not be mined") - except KeyError as e: + except KeyError: # KeyError is expected pass @@ -249,7 +249,7 @@ class MnehfTest(DashTestFramework): assert_equal(get_bip9_details(node, 'testdummy')['status'], 'defined') self.log.info("Testing EHF signal with same bit") - self.log.info(f"Previous signal at height={ehf_height}, total blocks={node.getblockcount()}, should success at {ehf_hight + 576}") + self.log.info(f"Previous signal at height={ehf_height}, total blocks={node.getblockcount()}, should success at {ehf_height + 576}") self.slowly_generate_batch(576 - (node.getblockcount() - ehf_height) - 1) ehf_tx_sent = self.send_tx(ehf_tx_second) self.log.info("Mine block and ensure not mined yet...")