mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-12 19:20:42 +02:00
Qt/Options: Configure blockreconstructionextratxn using rwconf
This commit is contained in:
parent
8102b5aa39
commit
e8f3dbeb28
@ -200,6 +200,17 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
|
|||||||
ui->verticalLayout_Wallet->insertWidget(0, walletrbf);
|
ui->verticalLayout_Wallet->insertWidget(0, walletrbf);
|
||||||
FixTabOrder(walletrbf);
|
FixTabOrder(walletrbf);
|
||||||
|
|
||||||
|
/* Network tab */
|
||||||
|
QLayoutItem *spacer = ui->verticalLayout_Network->takeAt(ui->verticalLayout_Network->count() - 1);
|
||||||
|
prevwidget = dynamic_cast<QWidgetItem*>(ui->verticalLayout_Network->itemAt(ui->verticalLayout_Network->count() - 1))->widget();
|
||||||
|
|
||||||
|
blockreconstructionextratxn = new QSpinBox(ui->tabNetwork);
|
||||||
|
blockreconstructionextratxn->setMinimum(0);
|
||||||
|
blockreconstructionextratxn->setMaximum(std::numeric_limits<int>::max());
|
||||||
|
CreateOptionUI(ui->verticalLayout_Network, blockreconstructionextratxn, tr("Keep at most %s extra transactions in memory for compact block reconstruction"));
|
||||||
|
|
||||||
|
ui->verticalLayout_Network->addItem(spacer);
|
||||||
|
|
||||||
prevwidget = ui->peerbloomfilters;
|
prevwidget = ui->peerbloomfilters;
|
||||||
|
|
||||||
/* Mempool tab */
|
/* Mempool tab */
|
||||||
@ -550,6 +561,8 @@ void OptionsDialog::setMapper()
|
|||||||
ui->peerblockfilters->setToolTip(ui->peerblockfilters->toolTip() + " " + tr("(only available if enabled at least once before turning on pruning)"));
|
ui->peerblockfilters->setToolTip(ui->peerblockfilters->toolTip() + " " + tr("(only available if enabled at least once before turning on pruning)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mapper->addMapping(blockreconstructionextratxn, OptionsModel::blockreconstructionextratxn);
|
||||||
|
|
||||||
/* Mempool tab */
|
/* Mempool tab */
|
||||||
|
|
||||||
QVariant current_mempoolreplacement = model->data(model->index(OptionsModel::mempoolreplacement, 0), Qt::EditRole);
|
QVariant current_mempoolreplacement = model->data(model->index(OptionsModel::mempoolreplacement, 0), Qt::EditRole);
|
||||||
|
@ -96,6 +96,8 @@ private:
|
|||||||
|
|
||||||
QCheckBox *walletrbf;
|
QCheckBox *walletrbf;
|
||||||
|
|
||||||
|
QSpinBox *blockreconstructionextratxn;
|
||||||
|
|
||||||
QValueComboBox *mempoolreplacement;
|
QValueComboBox *mempoolreplacement;
|
||||||
QSpinBox *maxorphantx;
|
QSpinBox *maxorphantx;
|
||||||
QSpinBox *maxmempool;
|
QSpinBox *maxmempool;
|
||||||
|
@ -675,6 +675,8 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
|
|||||||
return qlonglong(gArgs.GetIntArg("-blockprioritysize", DEFAULT_BLOCK_PRIORITY_SIZE) / 1000);
|
return qlonglong(gArgs.GetIntArg("-blockprioritysize", DEFAULT_BLOCK_PRIORITY_SIZE) / 1000);
|
||||||
case blockmaxweight:
|
case blockmaxweight:
|
||||||
return qlonglong(gArgs.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT) / 1000);
|
return qlonglong(gArgs.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT) / 1000);
|
||||||
|
case blockreconstructionextratxn:
|
||||||
|
return qlonglong(gArgs.GetIntArg("-blockreconstructionextratxn", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN));
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@ -1176,6 +1178,13 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
|
|||||||
gArgs.ModifyRWConfigFile(strKey, strNv);
|
gArgs.ModifyRWConfigFile(strKey, strNv);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case blockreconstructionextratxn:
|
||||||
|
if (changed()) {
|
||||||
|
std::string strNv = value.toString().toStdString();
|
||||||
|
gArgs.ForceSetArg("-blockreconstructionextratxn", strNv);
|
||||||
|
gArgs.ModifyRWConfigFile("blockreconstructionextratxn", strNv);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,7 @@ public:
|
|||||||
blockmaxsize,
|
blockmaxsize,
|
||||||
blockprioritysize,
|
blockprioritysize,
|
||||||
blockmaxweight,
|
blockmaxweight,
|
||||||
|
blockreconstructionextratxn,
|
||||||
OptionIDRowCount,
|
OptionIDRowCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user