Qt/Options: Configure maxmempool using rwconf

This commit is contained in:
Luke Dashjr 2023-09-06 03:22:27 +00:00
parent 04ac0eb698
commit 3d0f771518
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
CreateOptionUI(verticalLayout_Mempool, maxorphantx, tr("Keep at most %s unconnected transactions in memory"));
maxmempool = new QSpinBox(tabMempool);
const int64_t nMempoolSizeMinMB = maxmempoolMinimumBytes(gArgs.GetIntArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT_KVB) * 1'000);
const int64_t nMempoolSizeMinMB = maxmempoolMinimumBytes(gArgs.GetIntArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT_KVB) * 1'000) / 1'000'000;
maxmempool->setMinimum(nMempoolSizeMinMB);
maxmempool->setMaximum(std::numeric_limits<int>::max());
CreateOptionUI(verticalLayout_Mempool, maxmempool, tr("Keep the transaction memory pool below %s MB"));

View File

@ -613,7 +613,7 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
case maxorphantx:
return qlonglong(gArgs.GetIntArg("-maxorphantx", DEFAULT_MAX_ORPHAN_TRANSACTIONS));
case maxmempool:
return qlonglong(node().mempool().m_max_size_bytes);
return qlonglong(node().mempool().m_max_size_bytes / 1'000'000);
default:
return QVariant();
}