Litecoin: Disable RBF
This commit is contained in:
parent
ea50f66c1f
commit
0af99bc29d
@ -1107,16 +1107,6 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis p
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="optInRBF">
|
||||
<property name="text">
|
||||
<string>Enable Replace-By-Fee</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>With Replace-By-Fee (BIP-125) you can increase a transaction's fee after it is sent. Without this, a higher fee may be recommended to compensate for increased transaction delay risk.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -173,15 +173,17 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel()));
|
||||
connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
// Litecoin: Disable RBF
|
||||
// connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel()));
|
||||
// connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
ui->customFee->setSingleStep(model->wallet().getRequiredFee(1000));
|
||||
updateFeeSectionControls();
|
||||
updateMinFeeLabel();
|
||||
updateSmartFeeLabel();
|
||||
|
||||
// set default rbf checkbox state
|
||||
ui->optInRBF->setCheckState(Qt::Checked);
|
||||
// Litecoin: Disable RBF
|
||||
// ui->optInRBF->setCheckState(Qt::Checked);
|
||||
|
||||
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
||||
QSettings settings;
|
||||
@ -335,6 +337,7 @@ void SendCoinsDialog::on_sendButton_clicked()
|
||||
questionString.append("</span><br />");
|
||||
|
||||
// append RBF message according to transaction's signalling
|
||||
/* Litecoin: Disable RBF
|
||||
questionString.append("<span style='font-size:10pt; font-weight:normal;'>");
|
||||
if (ui->optInRBF->isChecked()) {
|
||||
questionString.append(tr("You can increase the fee later (signals Replace-By-Fee, BIP-125)."));
|
||||
@ -342,6 +345,7 @@ void SendCoinsDialog::on_sendButton_clicked()
|
||||
questionString.append(tr("Not signalling Replace-By-Fee, BIP-125."));
|
||||
}
|
||||
questionString.append("</span>");
|
||||
*/
|
||||
}
|
||||
|
||||
// add total amount in all subdivision units
|
||||
@ -682,7 +686,8 @@ void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl)
|
||||
// Avoid using global defaults when sending money from the GUI
|
||||
// Either custom fee will be used or if not selected, the confirmation target from dropdown box
|
||||
ctrl.m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex());
|
||||
ctrl.m_signal_bip125_rbf = ui->optInRBF->isChecked();
|
||||
// Litecoin: Disable RBF GUI
|
||||
// ctrl.m_signal_bip125_rbf = ui->optInRBF->isChecked();
|
||||
}
|
||||
|
||||
void SendCoinsDialog::updateSmartFeeLabel()
|
||||
|
||||
@ -60,10 +60,12 @@ uint256 SendCoins(CWallet& wallet, SendCoinsDialog& sendCoinsDialog, const CTxDe
|
||||
SendCoinsEntry* entry = qobject_cast<SendCoinsEntry*>(entries->itemAt(0)->widget());
|
||||
entry->findChild<QValidatedLineEdit*>("payTo")->setText(QString::fromStdString(EncodeDestination(address)));
|
||||
entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount);
|
||||
/* Litecon: Disabled RBF UI
|
||||
sendCoinsDialog.findChild<QFrame*>("frameFee")
|
||||
->findChild<QFrame*>("frameFeeSelection")
|
||||
->findChild<QCheckBox*>("optInRBF")
|
||||
->setCheckState(rbf ? Qt::Checked : Qt::Unchecked);
|
||||
*/
|
||||
uint256 txid;
|
||||
boost::signals2::scoped_connection c(wallet.NotifyTransactionChanged.connect([&txid](CWallet*, const uint256& hash, ChangeType status) {
|
||||
if (status == CT_NEW) txid = hash;
|
||||
@ -88,6 +90,7 @@ QModelIndex FindTx(const QAbstractItemModel& model, const uint256& txid)
|
||||
}
|
||||
|
||||
//! Invoke bumpfee on txid and check results.
|
||||
/* Litecoin: Disable RBF
|
||||
void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, std::string expectError, bool cancel)
|
||||
{
|
||||
QTableView* table = view.findChild<QTableView*>("transactionView");
|
||||
@ -112,6 +115,7 @@ void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, st
|
||||
action->trigger();
|
||||
QVERIFY(text.indexOf(QString::fromStdString(expectError)) != -1);
|
||||
}
|
||||
*/
|
||||
|
||||
//! Simple qt wallet tests.
|
||||
//
|
||||
@ -171,10 +175,11 @@ void TestGUI()
|
||||
QVERIFY(FindTx(*transactionTableModel, txid2).isValid());
|
||||
|
||||
// Call bumpfee. Test disabled, canceled, enabled, then failing cases.
|
||||
BumpFee(transactionView, txid1, true /* expect disabled */, "not BIP 125 replaceable" /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, true /* cancel */);
|
||||
BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid2, true /* expect disabled */, "already bumped" /* expected error */, false /* cancel */);
|
||||
// Litecoin: Disable BumpFee tests
|
||||
// BumpFee(transactionView, txid1, true /* expect disabled */, "not BIP 125 replaceable" /* expected error */, false /* cancel */);
|
||||
// BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, true /* cancel */);
|
||||
// BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, false /* cancel */);
|
||||
// BumpFee(transactionView, txid2, true /* expect disabled */, "already bumped" /* expected error */, false /* cancel */);
|
||||
|
||||
// Check current balance on OverviewPage
|
||||
OverviewPage overviewPage(platformStyle.get());
|
||||
|
||||
@ -121,7 +121,7 @@ static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
|
||||
/** Default for -persistmempool */
|
||||
static const bool DEFAULT_PERSIST_MEMPOOL = true;
|
||||
/** Default for -mempoolreplacement */
|
||||
static const bool DEFAULT_ENABLE_REPLACEMENT = true;
|
||||
static const bool DEFAULT_ENABLE_REPLACEMENT = false;
|
||||
/** Default for using fee filter */
|
||||
static const bool DEFAULT_FEEFILTER = true;
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [[
|
||||
'-txindex',
|
||||
'-mempoolreplacement=1',
|
||||
'-reindex', # Need reindex for txindex
|
||||
'-acceptnonstdtxn=0', # Try to mimic main-net
|
||||
]] * self.num_nodes
|
||||
|
||||
@ -196,7 +196,7 @@ class SegWitTest(BitcoinTestFramework):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 3
|
||||
# This test tests SegWit both pre and post-activation, so use the normal BIP9 activation.
|
||||
self.extra_args = [["-whitelist=127.0.0.1", "-vbparams=segwit:0:999999999999"], ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0", "-vbparams=segwit:0:999999999999"], ["-whitelist=127.0.0.1", "-vbparams=segwit:0:0"]]
|
||||
self.extra_args = [["-whitelist=127.0.0.1", "-vbparams=segwit:0:999999999999", "-mempoolreplacement=1"], ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0", "-vbparams=segwit:0:999999999999", "-mempoolreplacement=1"], ["-whitelist=127.0.0.1", "-vbparams=segwit:0:0", "-mempoolreplacement=1"]]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@ -41,6 +41,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
self.setup_clean_chain = True
|
||||
self.extra_args = [["-mempoolreplacement=1"], ["-mempoolreplacement=1"]]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@ -18,7 +18,7 @@ from decimal import Decimal
|
||||
|
||||
from test_framework.blocktools import add_witness_commitment, create_block, create_coinbase, send_to_witness
|
||||
from test_framework.messages import BIP125_SEQUENCE_NUMBER, CTransaction
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.test_framework import BitcoinTestFramework, SkipTest
|
||||
from test_framework.util import assert_equal, assert_greater_than, assert_raises_rpc_error, bytes_to_hex_str, connect_nodes_bi, hex_str_to_bytes, sync_mempools
|
||||
|
||||
import io
|
||||
@ -40,6 +40,8 @@ class BumpFeeTest(BitcoinTestFramework):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
def run_test(self):
|
||||
raise SkipTest("Litecoin doesn't support RBF.")
|
||||
|
||||
# Encrypt wallet for test_locked_wallet_fails test
|
||||
self.nodes[1].node_encrypt_wallet(WALLET_PASSPHRASE)
|
||||
self.start_node(1)
|
||||
|
||||
@ -102,7 +102,8 @@ class ListTransactionsTest(BitcoinTestFramework):
|
||||
{"category": "receive", "amount": Decimal("0.1")},
|
||||
{"txid": txid, "label": "watchonly"})
|
||||
|
||||
self.run_rbf_opt_in_test()
|
||||
# Litecoin has RBF disabled
|
||||
# self.run_rbf_opt_in_test()
|
||||
|
||||
# Check that the opt-in-rbf flag works properly, for sent and received
|
||||
# transactions.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user