initialize genesis block

This commit is contained in:
wowario 2023-01-31 01:39:15 +03:00
parent 92ebb323e1
commit 4c6e685174
No known key found for this signature in database
GPG key ID: 793504B449C69220

View file

@ -820,7 +820,7 @@ void BlockchainLMDB::add_block(const block& blk, size_t block_weight, uint64_t l
bi.bi_diff_lo = (cumulative_difficulty & 0xffffffffffffffff).convert_to<uint64_t>();
bi.bi_hash = blk_hash;
bi.bi_cum_rct = num_rct_outs;
if (blk.major_version >= 4)
if (m_height > 0 && blk.major_version >= 4)
{
uint64_t last_height = m_height-1;
MDB_val_set(h, last_height);