1
0
Fork 0
forked from lthn/blockchain

simplewallet in RPC mode now scans tx pool even if PoS-mining not activated (fixes unconfirmed txs for RPC API) closes #165

This commit is contained in:
sowle 2020-04-07 16:29:03 +03:00
parent 2c2374910b
commit af8ef3399a
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -74,11 +74,12 @@ namespace tools
return true;
}
bool has_related_alias_in_unconfirmed = false;
LOG_PRINT_L2("wallet RPC idle: scanning tx pool...");
m_wallet.scan_tx_pool(has_related_alias_in_unconfirmed);
if (m_do_mint)
{
bool has_related_alias_in_unconfirmed = false;
LOG_PRINT_L2("wallet RPC idle: scanning tx pool...");
m_wallet.scan_tx_pool(has_related_alias_in_unconfirmed);
LOG_PRINT_L2("wallet RPC idle: trying to do PoS iteration...");
m_wallet.try_mint_pos(miner_address);
}
@ -582,7 +583,7 @@ namespace tools
{
bool tx_id_specified = req.tx_id != currency::null_hash;
//
// process confirmed txs
m_wallet.enumerate_transfers_history([&](const wallet_public::wallet_transfer_info& wti) -> bool {
if (tx_id_specified)
@ -616,7 +617,7 @@ namespace tools
return true; // continue
}, false /* enumerate_forward */);
// process unconfirmed txs
if (req.pool)
{
m_wallet.enumerate_unconfirmed_transfers([&](const wallet_public::wallet_transfer_info& wti) -> bool {