Skip to content

Commit cb04705

Browse files
authored
Repair check should be base on block height
1 parent 62e9444 commit cb04705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cryptonote_core/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ bool Blockchain::validate_miner_diardiV2(const block& b) {
13151315
LOG_PRINT_L3("Blockchain::" << __func__);
13161316

13171317
uint8_t version = b.major_version;
1318-
uint64_t block_height = m_db->height();
1318+
uint64_t block_height = (b.miner_tx.vin.size() < 1 || b.miner_tx.vin[0].type() != typeid(txin_gen)) ? m_db->height() : boost::get<txin_gen>(b.miner_tx.vin[0]).height;
13191319
bool isDiardiBlock = (version >= 13 && block_height % 4 == 0);
13201320
if (!isDiardiBlock) return true;
13211321

0 commit comments

Comments
 (0)