wallet: PoS mining timings

This commit is contained in:
sowle 2023-05-26 22:11:23 +02:00
parent b557b0ef93
commit 4e9c328be0
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -3521,6 +3521,7 @@ bool wallet2::try_mint_pos()
//------------------------------------------------------------------
bool wallet2::try_mint_pos(const currency::account_public_address& miner_address)
{
TIME_MEASURE_START_MS(mining_duration_ms);
mining_context ctx = AUTO_VAL_INIT(ctx);
WLT_LOG_L1("Starting PoS mining iteration");
fill_mining_context(ctx);
@ -3550,8 +3551,9 @@ bool wallet2::try_mint_pos(const currency::account_public_address& miner_address
{
build_minted_block(ctx.sp, ctx.rsp, miner_address);
}
TIME_MEASURE_FINISH_MS(mining_duration_ms);
WLT_LOG_L0("PoS mining: " << ctx.rsp.iterations_processed << " iterations finished, status: " << ctx.rsp.status << ", used " << ctx.sp.pos_entries.size() << " entries with total amount: " << print_money_brief(pos_entries_amount));
WLT_LOG_L0("PoS mining: " << ctx.rsp.iterations_processed << " iterations finished (" << std::fixed << std::setprecision(2) << (mining_duration_ms / 1000.0f) << "s), status: " << ctx.rsp.status << ", used " << ctx.sp.pos_entries.size() << " entries with total amount: " << print_money_brief(pos_entries_amount));
return true;
}