Restart devnet from scratch 2

- We avoid generating outputs if the amount is 0 (0 miner rewards in
HF16, alternative rounds with no tx's have 0 fees awarded)

- Adjust the time catch/delay mechanism for Pulse from 15s to 30s.
This commit is contained in:
Doyle 2020-09-14 17:49:56 +10:00 committed by Jason Rhinelander
parent f2e1798b8b
commit 6c4ab79977

View file

@ -596,6 +596,13 @@ bool Blockchain::init(BlockchainDB* db, sqlite3 *lns_db, const network_type nett
return false;
}
if (m_nettype == DEVNET && get_current_blockchain_height() > 1)
{
block_header header = m_db->get_block_header_from_height(1);
if (header.timestamp < 1600000000)
pop_blocks(get_current_blockchain_height() - 1);
}
return true;
}
//------------------------------------------------------------------