forked from lthn/blockchain
core: log hardfork passing
This commit is contained in:
parent
c1760eb660
commit
6f4ecb9f3d
1 changed files with 11 additions and 1 deletions
|
|
@ -493,7 +493,17 @@ namespace currency
|
|||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::add_new_block(const block& b, block_verification_context& bvc)
|
||||
{
|
||||
return m_blockchain_storage.add_new_block(b, bvc);
|
||||
bool r = m_blockchain_storage.add_new_block(b, bvc);
|
||||
if (r && bvc.m_added_to_main_chain)
|
||||
{
|
||||
uint64_t h = get_block_height(b);
|
||||
auto& crc = m_blockchain_storage.get_core_runtime_config();
|
||||
if (h == crc.hard_fork_01_starts_after_height + 1)
|
||||
{ LOG_PRINT_GREEN("Hardfork 1 activated at height " << h, LOG_LEVEL_0); }
|
||||
else if (h == crc.hard_fork_02_starts_after_height + 1)
|
||||
{ LOG_PRINT_GREEN("Hardfork 2 activated at height " << h, LOG_LEVEL_0); }
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::parse_block(const blobdata& block_blob, block& b, block_verification_context& bvc)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue