1
0
Fork 0
forked from lthn/blockchain

wallet: PoS timings added

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

View file

@ -4129,6 +4129,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);
@ -4154,8 +4155,9 @@ bool wallet2::try_mint_pos(const currency::account_public_address& miner_address
{
build_minted_block(ctx, miner_address);
}
TIME_MEASURE_FINISH_MS(mining_duration_ms);
WLT_LOG_L0("PoS mining: " << ctx.iterations_processed << " iterations finished, status: " << ctx.status << ", " << ctx.total_items_checked << " entries with total amount: " << print_money_brief(ctx.total_amount_checked));
WLT_LOG_L0("PoS mining: " << ctx.iterations_processed << " iterations finished (" << std::fixed << std::setprecision(2) << (mining_duration_ms / 1000.0f) << "s), status: " << ctx.status << ", " << ctx.total_items_checked << " entries with total amount: " << print_money_brief(ctx.total_amount_checked));
return true;
}