Skip to content

Commit 20d59e1

Browse files
authored
Merge pull request #3102 from codablock/pr_pr_backports_v15_v16_2
Backport Bitcoin 0.16 PRs which were backported into 0.15 - part1
2 parents 9f1ee8c + 3eb0e14 commit 20d59e1

File tree

13 files changed

+200
-89
lines changed

13 files changed

+200
-89
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ script: |
161161
export PATH=${WRAP_DIR}:${PATH}
162162
163163
# Create the release tarball using (arbitrarily) the first host
164-
export GIT_DIR="$PWD/.git"
165164
./autogen.sh
166165
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
167166
make dist
@@ -174,6 +173,9 @@ script: |
174173
find dashcore-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
175174
popd
176175
176+
# Workaround for tarball not building with the bare tag version (prep)
177+
make -C src obj/build.h
178+
177179
ORIGPATH="$PATH"
178180
# Extract the release tarball into a dir for each host and build
179181
for i in ${HOSTS}; do
@@ -184,6 +186,11 @@ script: |
184186
mkdir -p ${INSTALLPATH}
185187
tar --strip-components=1 -xf ../$SOURCEDIST
186188
189+
# Workaround for tarball not building with the bare tag version
190+
echo '#!/bin/true' >share/genbuild.sh
191+
mkdir src/obj
192+
cp ../src/obj/build.h src/obj/
193+
187194
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
188195
make ${MAKEOPTS}
189196
make ${MAKEOPTS} -C src check-security

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ script: |
120120
export PATH=${WRAP_DIR}:${PATH}
121121
122122
# Create the release tarball using (arbitrarily) the first host
123-
export GIT_DIR="$PWD/.git"
124123
./autogen.sh
125124
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
126125
make dist
@@ -134,6 +133,9 @@ script: |
134133
find dashcore-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
135134
popd
136135
136+
# Workaround for tarball not building with the bare tag version (prep)
137+
make -C src obj/build.h
138+
137139
ORIGPATH="$PATH"
138140
# Extract the release tarball into a dir for each host and build
139141
for i in ${HOSTS}; do
@@ -144,6 +146,11 @@ script: |
144146
mkdir -p ${INSTALLPATH}
145147
tar --strip-components=1 -xf ../$SOURCEDIST
146148
149+
# Workaround for tarball not building with the bare tag version
150+
echo '#!/bin/true' >share/genbuild.sh
151+
mkdir src/obj
152+
cp ../src/obj/build.h src/obj/
153+
147154
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
148155
make ${MAKEOPTS}
149156
make -C src osx_debug

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ script: |
149149
export PATH=${WRAP_DIR}:${PATH}
150150
151151
# Create the release tarball using (arbitrarily) the first host
152-
export GIT_DIR="$PWD/.git"
153152
./autogen.sh
154153
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
155154
make dist
@@ -165,6 +164,9 @@ script: |
165164
cp ../$SOURCEDIST $OUTDIR/src
166165
popd
167166
167+
# Workaround for tarball not building with the bare tag version (prep)
168+
make -C src obj/build.h
169+
168170
ORIGPATH="$PATH"
169171
# Extract the release tarball into a dir for each host and build
170172
for i in ${HOSTS}; do
@@ -175,6 +177,11 @@ script: |
175177
mkdir -p ${INSTALLPATH}
176178
tar --strip-components=1 -xf ../$SOURCEDIST
177179
180+
# Workaround for tarball not building with the bare tag version
181+
echo '#!/bin/true' >share/genbuild.sh
182+
mkdir src/obj
183+
cp ../src/obj/build.h src/obj/
184+
178185
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
179186
make ${MAKEOPTS}
180187
make ${MAKEOPTS} -C src check-security

doc/build-windows.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Below are some notes on how to build Dash Core for Windows.
66
Most developers use cross-compilation from Ubuntu to build executables for
77
Windows. This is also used to build the release binaries.
88

9+
Currently only building on Ubuntu Trusty 14.04 is supported.
10+
Other versions are unsupported or known to be broken (e.g. Ubuntu Xenial 16.04).
11+
912
While there are potentially a number of ways to build on Windows (for example using msys / mingw-w64),
1013
using the Windows Subsystem For Linux is the most straightforward. If you are building with
1114
another method, please contribute the instructions here for others who are running versions

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
17851785

17861786
// Check for changed -txindex state
17871787
if (fTxIndex != gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) {
1788-
strLoadError = _("You need to rebuild the database using -reindex-chainstate to change -txindex");
1788+
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
17891789
break;
17901790
}
17911791

src/key.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ struct CExtKey {
172172
{
173173
unsigned int len = ::ReadCompactSize(s);
174174
unsigned char code[BIP32_EXTKEY_SIZE];
175+
if (len != BIP32_EXTKEY_SIZE)
176+
throw std::runtime_error("Invalid extended key size\n");
175177
s.read((char *)&code[0], len);
176178
Decode(code);
177179
}

src/qt/forms/sendcoinsdialog.ui

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -846,19 +846,13 @@
846846
<item>
847847
<layout class="QHBoxLayout" name="horizontalLayoutFee13">
848848
<item>
849-
<widget class="QRadioButton" name="radioCustomPerKilobyte">
849+
<widget class="QLabel" name="labelCustomPerKilobyte">
850850
<property name="toolTip">
851851
<string>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</string>
852852
</property>
853853
<property name="text">
854854
<string>per kilobyte</string>
855855
</property>
856-
<property name="checked">
857-
<bool>true</bool>
858-
</property>
859-
<attribute name="buttonGroup">
860-
<string notr="true">groupCustomFee</string>
861-
</attribute>
862856
</widget>
863857
</item>
864858
<item>
@@ -1272,7 +1266,6 @@
12721266
</resources>
12731267
<connections/>
12741268
<buttongroups>
1275-
<buttongroup name="groupCustomFee"/>
12761269
<buttongroup name="groupFee"/>
12771270
</buttongroups>
12781271
</ui>

src/qt/sendcoinsdialog.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
148148
settings.setValue("nFeeRadio", 1); // custom
149149
if (!settings.contains("nFeeRadio"))
150150
settings.setValue("nFeeRadio", 0); // recommended
151-
if (!settings.contains("nCustomFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility
152-
settings.setValue("nCustomFeeRadio", 1); // total at least
153-
if (!settings.contains("nCustomFeeRadio"))
154-
settings.setValue("nCustomFeeRadio", 0); // per kilobyte
155151
if (!settings.contains("nSmartFeeSliderPosition"))
156152
settings.setValue("nSmartFeeSliderPosition", 0);
157153
if (!settings.contains("nTransactionFee"))
@@ -162,8 +158,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
162158
ui->groupFee->setId(ui->radioSmartFee, 0);
163159
ui->groupFee->setId(ui->radioCustomFee, 1);
164160
ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
165-
ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0);
166-
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
167161
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
168162
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
169163
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
@@ -213,7 +207,6 @@ void SendCoinsDialog::setModel(WalletModel *_model)
213207
connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(coinControlUpdateLabels()));
214208
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));
215209
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
216-
connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
217210
connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));
218211
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
219212
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
@@ -244,7 +237,6 @@ SendCoinsDialog::~SendCoinsDialog()
244237
QSettings settings;
245238
settings.setValue("fFeeSectionMinimized", fFeeMinimized);
246239
settings.setValue("nFeeRadio", ui->groupFee->checkedId());
247-
settings.setValue("nCustomFeeRadio", ui->groupCustomFee->checkedId());
248240
settings.setValue("nConfTarget", getConfTargetForIndex(ui->confTargetSelector->currentIndex()));
249241
settings.setValue("nTransactionFee", (qint64)ui->customFee->value());
250242
settings.setValue("fPayOnlyMinFee", ui->checkBoxMinimumFee->isChecked());
@@ -699,7 +691,6 @@ void SendCoinsDialog::on_buttonMinimizeFee_clicked()
699691

700692
void SendCoinsDialog::setMinimumFee()
701693
{
702-
ui->radioCustomPerKilobyte->setChecked(true);
703694
ui->customFee->setValue(CWallet::GetRequiredFee(1000));
704695
}
705696

@@ -712,7 +703,7 @@ void SendCoinsDialog::updateFeeSectionControls()
712703
ui->labelFeeEstimation ->setEnabled(ui->radioSmartFee->isChecked());
713704
ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked());
714705
ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked());
715-
ui->radioCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
706+
ui->labelCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
716707
ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
717708
}
718709

@@ -724,8 +715,7 @@ void SendCoinsDialog::updateFeeMinimizedLabel()
724715
if (ui->radioSmartFee->isChecked())
725716
ui->labelFeeMinimized->setText(ui->labelSmartFee->text());
726717
else {
727-
ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) +
728-
((ui->radioCustomPerKilobyte->isChecked()) ? "/kB" : ""));
718+
ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) + "/kB");
729719
}
730720
}
731721

src/rpc/client.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
120120
{ "sendrawtransaction", 1, "allowhighfees" },
121121
{ "sendrawtransaction", 2, "instantsend" },
122122
{ "sendrawtransaction", 3, "bypasslimits" },
123+
{ "combinerawtransaction", 0, "txs" },
123124
{ "fundrawtransaction", 1, "options" },
124125
{ "gettxout", 1, "n" },
125126
{ "gettxout", 2, "include_mempool" },

0 commit comments

Comments
 (0)