diff --git a/extensions/bytecoin-v2/cryptonight-v7.json b/extensions/bytecoin-v2/cryptonight-v7.json index f8335dd..ffb994e 100644 --- a/extensions/bytecoin-v2/cryptonight-v7.json +++ b/extensions/bytecoin-v2/cryptonight-v7.json @@ -112,7 +112,7 @@ "parameters": { "text": [ " uint32_t cn_variant = 0;", - " if (m_POWCryptoNightV7BlockIndex >= block.getBlockIndex() && m_POWCryptoNightV7LastBlock <= block.getBlockIndex())", + " if (m_POWCryptoNightV7BlockIndex && m_POWCryptoNightV7BlockIndex <= block.getBlockIndex() && (m_POWCryptoNightV7LastBlock == 0 || m_POWCryptoNightV7LastBlock >= block.getBlockIndex()))", " cn_variant = 1;", " return check_hash(block.getBlockLongHash(context, cn_variant), currentDifficulty);" ] @@ -124,7 +124,7 @@ "parameters": { "text": [ " uint32_t cn_variant = 0;", - " if (m_POWCryptoNightV7BlockIndex >= cachedBlock.getBlockIndex() && m_POWCryptoNightV7LastBlock <= cachedBlock.getBlockIndex())", + " if (m_POWCryptoNightV7BlockIndex && m_POWCryptoNightV7BlockIndex <= cachedBlock.getBlockIndex() && (m_POWCryptoNightV7LastBlock == 0 || m_POWCryptoNightV7LastBlock >= cachedBlock.getBlockIndex()))", " cn_variant = 1;", " if (!check_hash(cachedBlock.getBlockLongHash(context, cn_variant), currentDifficulty)) {" ] @@ -141,7 +141,7 @@ "parameters": { "text": [ " uint32_t cn_variant = 0;", - " if (m_currency.POWCryptoNightV7BlockIndex() >= cb.getBlockIndex() && m_currency.POWCryptoNightV7LastBlock() <= cb.getBlockIndex())", + " if (m_currency.POWCryptoNightV7BlockIndex() && m_currency.POWCryptoNightV7BlockIndex() <= cb.getBlockIndex() && (m_currency.POWCryptoNightV7LastBlock() == 0 || m_currency.POWCryptoNightV7LastBlock() >= cb.getBlockIndex()))", " cn_variant = 1;" ] } @@ -161,7 +161,7 @@ "parameters": { "text": [ " uint32_t cn_variant = 0;", - "// if (m_currency.POWCryptoNightV7BlockIndex() >= cb.getBlockIndex() && m_currency.POWCryptoNightV7LastBlock() <= cb.getBlockIndex())", + "// if (m_currency.POWCryptoNightV7BlockIndex() && m_currency.POWCryptoNightV7BlockIndex() <= cb.getBlockIndex() && (m_currency.POWCryptoNightV7LastBlock() == 0 || m_currency.POWCryptoNightV7LastBlock() >= cb.getBlockIndex()))", "// cn_variant = 1;" ] } @@ -172,7 +172,7 @@ "parameters": { "text": [ " uint32_t cn_variant = 0;", - "// if (m_currency.POWCryptoNightV7BlockIndex() >= cb.getBlockIndex() && m_currency.POWCryptoNightV7LastBlock() <= cb.getBlockIndex())", + "// if (m_currency.POWCryptoNightV7BlockIndex() && m_currency.POWCryptoNightV7BlockIndex() <= cb.getBlockIndex() && (m_currency.POWCryptoNightV7LastBlock() == 0 || m_currency.POWCryptoNightV7LastBlock() >= cb.getBlockIndex()))", "// cn_variant = 1;" ] }