aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-08-11 11:59:33 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-08-11 11:59:40 +0200
commit28a9df7d76a6bdd118cceacf31c5584325f45d8e (patch)
tree734d51160f8b86fd533330284424ea868a065dfd
parent05f5dd96c71e8d989c6f04771a3eab9d41f1ea49 (diff)
parentbe951470bea132b4cbe1823cd564bf14aaf0ea7e (diff)
downloadbitcoin-28a9df7d76a6bdd118cceacf31c5584325f45d8e.tar.xz
Merge #19025: [0.19] Backports
be951470bea132b4cbe1823cd564bf14aaf0ea7e Updated appveyor job to checkout a specific vcpkg commit ID. (Aaron Clauson) 1fd9cd2cb40a89a07de5b8b0bc870efe65a505d7 appveyor: Remove clcache (MarcoFalke) 8c0a9595ec81328a250dd1a79fcc3d2010db4d6d Remove cached directories and associated script blocks from appveyor CI configuration. (Aaron Clauson) d70f7000212b0050672452b762d92124f402eda6 lint: fix shellcheck URL in CI install (fanquake) f8f7d91b805928fe5a986e3dff6a9a73ac96e128 test: remove Cirrus CI FreeBSD job (fanquake) b7e16a82c99768494afb000dd19e308f306a89c3 Add missing QPainterPath include (Andrew Chow) 30a28146ac23aa3a9e510c5d6ab9a8d2c5b8177e gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged (João Barbosa) 0d87a5b4e2153a00e33474b56b48f0814c231697 QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate (Luke Dashjr) bde6a5a676e4de7c5133f61784a3239bb4a28f2e Bugfix: Include "csv","!segwit" in "rules" (Luke Dashjr) e422f65aee4b2a817b31bbd37c79d178570579df build: Set libevent minimum version to 2.0.21 (Hennadii Stepanov) 0d0dd6ae96c6e12226bba07994394ae78f7cddc6 Update with new Windows code signing certificate (Andrew Chow) Pull request description: Backports the following to the 0.19 branch: * #17946 - Fix GBT: Restore "!segwit" and "csv" to "rules" key * #18160 - gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged * #18425 - releases: Update with new Windows code signing certificate * #18676 - build: Check libevent minimum version in configure script * #19097 - qt: Add missing QPainterPath include (as per #19510) * #18640 - appveyor: Remove clcache * #19444 - test: Remove cached directories and associated script blocks from appveyor config * #19612 - lint: fix shellcheck URL in CI install * #18001 - Updated appveyor job to checkout a specific vcpkg commit ID Closes: #19510. ACKs for top commit: jnewbery: ACK be951470bea132b4cbe1823cd564bf14aaf0ea7e MarcoFalke: cherry-pick ACK be951470bea132b4cbe1823cd564bf14aaf0ea7e 🌎 Tree-SHA512: 2ec7e3ae1da99799ff6f8cfe26095d6885cffe6952b18a7e236dc5e657b3918225c2601b8c8e17cdff5319c40cb0a214d9fad49b0ff2f54af1db7c81d83a1df5
-rw-r--r--.appveyor.yml70
-rw-r--r--.cirrus.yml30
-rwxr-xr-xci/lint/04_install.sh2
-rw-r--r--configure.ac4
-rw-r--r--contrib/windeploy/win-codesign.cert56
-rw-r--r--doc/dependencies.md2
-rw-r--r--src/interfaces/wallet.cpp5
-rw-r--r--src/interfaces/wallet.h7
-rw-r--r--src/qt/trafficgraphwidget.cpp1
-rw-r--r--src/qt/walletmodel.cpp17
-rw-r--r--src/rpc/mining.cpp2
-rwxr-xr-xtest/functional/feature_segwit.py8
12 files changed, 75 insertions, 129 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index dacfba658b..443913672e 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -5,78 +5,54 @@ configuration: Release
platform: x64
clone_depth: 5
environment:
- APPVEYOR_SAVE_CACHE_ON_ERROR: true
- CLCACHE_SERVER: 1
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
PYTHONUTF8: 1
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
-cache:
-- C:\tools\vcpkg\installed -> build_msvc\vcpkg-packages.txt
-- C:\Users\appveyor\clcache -> .appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in
-- C:\Qt5.9.8_x64_static_vs2019
+ VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
install:
-- cmd: pip install --quiet git+https://github.com/frerich/clcache.git@v4.2.0
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
# - cmd: pip install zmq
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
-# 1. Check whether the vcpkg install directory exists (note that updating the vcpkg-packages.txt file
-# will cause the appveyor cache rules to invalidate the directory)
-# 2. If the directory is missing:
-# a. Update the vcpkg source (including port files) and build the vcpkg binary,
+# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
# b. Install the missing packages.
- ps: |
$env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt
- Write-Host "vcpkg list: $env:PACKAGES"
- if(!(Test-Path -Path ($env:VCPKG_INSTALL_PATH))) {
- cd c:\tools\vcpkg
- $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
- git pull origin master
- .\bootstrap-vcpkg.bat
- Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
- .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
- cd "$env:APPVEYOR_BUILD_FOLDER"
- }
- else {
- Write-Host "required vcpkg packages already installed."
- }
- c:\tools\vcpkg\vcpkg integrate install
+ Write-Host "vcpkg installing packages: $env:PACKAGES"
+ cd c:\tools\vcpkg
+ $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
+ git pull origin master > $null
+ git checkout $env:VCPKG_COMMIT_ID
+ git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
+ .\bootstrap-vcpkg.bat > $null
+ Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
+ .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
+ Write-Host "vcpkg packages installed successfully."
+ .\vcpkg integrate install
+ cd "$env:APPVEYOR_BUILD_FOLDER"
before_build:
-- ps: clcache -M 536870912
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:
-# 1. If the Qt destination directory exists assume it is correct and do nothing. To
-# force a fresh install of the packages delete the job's appveyor cache.
-# 2. Otherwise:
# a. Download the zip file with the prebuilt Qt static libraries.
# b. Check that the downloaded file matches the expected hash.
# c. Extract the zip file to the specific destination path expected by the msbuild projects.
- ps: |
- if(!(Test-Path -Path ($env:QT_LOCAL_PATH))) {
- Write-Host "Downloading Qt binaries.";
- Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
- Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
- if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
- Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
- Write-Host "Qt binary download matched the expected hash.";
- }
- else {
- Write-Host "ERROR: Qt binary download did not match the expected hash.";
- Exit-AppveyorBuild;
- }
+ Write-Host "Downloading Qt binaries.";
+ Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
+ Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
+ if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
+ Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
+ Write-Host "Qt binary download matched the expected hash.";
}
else {
- Write-Host "Qt binaries already present.";
+ Write-Host "ERROR: Qt binary download did not match the expected hash.";
+ Exit-AppveyorBuild;
}
- cmd: python build_msvc\msvc-autogen.py
-- ps: Start-Process clcache-server
-- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
build_script:
-- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nologo
+- cmd: msbuild /p:TrackFileAccess=false build_msvc\bitcoin.sln /m /v:q /nologo
after_build:
-- ps: fsutil behavior set disablelastaccess 1 # Disable Access time feature on Windows (better performance)
-- ps: clcache -z
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
test_script:
- cmd: src\test_bitcoin.exe -k stdout -e stdout 2> NUL
diff --git a/.cirrus.yml b/.cirrus.yml
index 9464ec1685..7b56a4e11e 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,34 +1,4 @@
task:
- name: "FreeBsd 12.0 amd64 [GOAL: install] [no depends, only system libs]"
- freebsd_instance:
- image: freebsd-12-0-release-amd64
- cpu: 8
- memory: 8G
- timeout_in: 60m
- env:
- MAKEJOBS: "-j9"
- CONFIGURE_OPTS: "--disable-dependency-tracking"
- GOAL: "install"
- TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
- CCACHE_SIZE: "200M"
- CCACHE_COMPRESS: 1
- CCACHE_DIR: "/tmp/ccache_dir"
- ccache_cache:
- folder: "/tmp/ccache_dir"
- install_script:
- - pkg install -y autoconf automake boost-libs git gmake libevent libtool openssl pkgconf python3 ccache
- - ./contrib/install_db4.sh $(pwd)
- - ccache --max-size=${CCACHE_SIZE}
- configure_script:
- - ./autogen.sh
- - ./configure ${CONFIGURE_OPTS} BDB_LIBS="-L$(pwd)/db4/lib -ldb_cxx-4.8" BDB_CFLAGS="-I$(pwd)/db4/include" || ( cat config.log && false)
- make_script:
- - gmake ${MAKEJOBS} ${GOAL} || ( echo "Build failure. Verbose build follows." && gmake ${GOAL} V=1 ; false )
- check_script:
- - gmake check ${MAKEJOBS} VERBOSE=1
- functional_test_script:
- - ./test/functional/test_runner.py --jobs 9 --ci --extended --exclude feature_dbcrash --combinedlogslen=1000 --quiet --failfast
-task:
name: "x86_64 Linux [GOAL: install] [bionic] [Using ./ci/ system]"
container:
image: ubuntu:18.04
diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh
index 12c3bfce45..993eec0abe 100755
--- a/ci/lint/04_install.sh
+++ b/ci/lint/04_install.sh
@@ -10,5 +10,5 @@ travis_retry pip3 install codespell==1.15.0
travis_retry pip3 install flake8==3.7.8
SHELLCHECK_VERSION=v0.6.0
-curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
+curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
diff --git a/configure.ac b/configure.ac
index 0e8a0813ad..ad6de55561 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1237,9 +1237,9 @@ if test x$use_pkgconfig = xyes; then
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
fi
if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
- PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
+ PKG_CHECK_MODULES([EVENT], [libevent >= 2.0.21],, [AC_MSG_ERROR(libevent version 2.0.21 or greater not found.)])
if test x$TARGET_OS != xwindows; then
- PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
+ PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.0.21],, [AC_MSG_ERROR(libevent_pthreads version 2.0.21 or greater not found.)])
fi
fi
diff --git a/contrib/windeploy/win-codesign.cert b/contrib/windeploy/win-codesign.cert
index 5bc5dc5809..4023a5b638 100644
--- a/contrib/windeploy/win-codesign.cert
+++ b/contrib/windeploy/win-codesign.cert
@@ -1,34 +1,34 @@
-----BEGIN CERTIFICATE-----
-MIIFcTCCBFmgAwIBAgIRALWcUnSOxv9FQW3xdaMDO6swDQYJKoZIhvcNAQELBQAw
+MIIFdDCCBFygAwIBAgIRAL98pqZb/N9LuNaNxKsHNGQwDQYJKoZIhvcNAQELBQAw
fDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQD
-ExtTZWN0aWdvIFJTQSBDb2RlIFNpZ25pbmcgQ0EwHhcNMTkwMzI3MDAwMDAwWhcN
-MjAwMzI2MjM1OTU5WjCBtDELMAkGA1UEBhMCQ0gxDTALBgNVBBEMBDgwMDUxCzAJ
-BgNVBAgMAlpIMRAwDgYDVQQHDAdaw7xyaWNoMRcwFQYDVQQJDA5NYXR0ZW5nYXNz
-ZSAyNzEuMCwGA1UECgwlQml0Y29pbiBDb3JlIENvZGUgU2lnbmluZyBBc3NvY2lh
-dGlvbjEuMCwGA1UEAwwlQml0Y29pbiBDb3JlIENvZGUgU2lnbmluZyBBc3NvY2lh
-dGlvbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK04VDwiY1wxcW3E
-WTTGmnbciCwETwC96DG4qcoH2PPNsVy3dfwGh0C02Qj2vL64IfwIGUFSgREvyjZk
-CNhEuJO2e0nO0rKNNH5v/JO+P7/VYPZkF5a3uUz9ulmihULXioieHB/q0l6BmiJL
-+cYaMVfidL9Y+IJwgiTqjnpRhv1Ik083SPsu6GcfQT9MJfY/+xse2EP0l4GfdFE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BgEF
+BQcCARYXaHR0cHM6Ly9zZWN0aWdvLmNvbS9DUFMwQwYDVR0fBDwwOjA4oDagNIYy
+aHR0cDovL2NybC5zZWN0aWdvLmNvbS9TZWN0aWdvUlNBQ29kZVNpZ25pbmdDQS5j
+cmwwcwYIKwYBBQUHAQEEZzBlMD4GCCsGAQUFBzAChjJodHRwOi8vY3J0LnNlY3Rp
+Z28uY29tL1NlY3RpZ29SU0FDb2RlU2lnbmluZ0NBLmNydDAjBggrBgEFBQcwAYYX
+aHR0cDovL29jc3Auc2VjdGlnby5jb20wKwYDVR0RBCQwIoEgam9uYXNAYml0Y29p
+bmNvcmVjb2Rlc2lnbmluZy5vcmcwDQYJKoZIhvcNAQELBQADggEBAAU59qJzQ2ED
+aTMIQTsU01zIhZJ/xwQh78i0v2Mnr46RvzYrZOev+btF3SyUYD8veNnbYlY6yEYq
+Vb+/PQnE3t1xlqR80qiTZCk/Wmxx/qKvQuWeRL5QQgvsCmWBpycQ7PNfwzOWxbPE
+b0Hb2/VFFZfR9iltkfeInRUrzS96CJGYtm7dMf2JtnXYBcwpn1N8BSMH4nXVyN8g
+VEE5KyjE7+/awYiSST7+e6Y7FE5AJ4f3FjqnRm+2XetTVqITwMLKZMoV283nSEeH
+fA4FNAMGz9QeV38ol65NNqFP2vSSgVoPK79orqH9OOW2LSobt2qun+euddJIQeYV
+CMP90b/2WPc=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
diff --git a/doc/dependencies.md b/doc/dependencies.md
index e5b4084d99..ae3d26839f 100644
--- a/doc/dependencies.md
+++ b/doc/dependencies.md
@@ -13,7 +13,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | |
| GCC | | [4.8+](https://gcc.gnu.org/) (C++11 support) | | | |
| HarfBuzz-NG | | | | | |
-| libevent | [2.1.8-stable](https://github.com/libevent/libevent/releases) | 2.0.22 | No | | |
+| libevent | [2.1.8-stable](https://github.com/libevent/libevent/releases) | [2.0.21](https://github.com/bitcoin/bitcoin/pull/18676) | No | | |
| libpng | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
| librsvg | | | | | |
| MiniUPnPc | [2.0.20180203](http://miniupnp.free.fr/files) | | No | | |
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index 0c8d92eba5..dbf0acbfbe 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -359,16 +359,17 @@ public:
}
return result;
}
- bool tryGetBalances(WalletBalances& balances, int& num_blocks) override
+ bool tryGetBalances(WalletBalances& balances, int& num_blocks, bool force, int cached_num_blocks) override
{
auto locked_chain = m_wallet->chain().lock(true /* try_lock */);
if (!locked_chain) return false;
+ num_blocks = locked_chain->getHeight().get_value_or(-1);
+ if (!force && num_blocks == cached_num_blocks) return false;
TRY_LOCK(m_wallet->cs_wallet, locked_wallet);
if (!locked_wallet) {
return false;
}
balances = getBalances();
- num_blocks = locked_chain->getHeight().get_value_or(-1);
return true;
}
CAmount getBalance() override { return m_wallet->GetBalance().m_mine_trusted; }
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index 89e056b18b..36ceb538fb 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -198,8 +198,11 @@ public:
//! Get balances.
virtual WalletBalances getBalances() = 0;
- //! Get balances if possible without blocking.
- virtual bool tryGetBalances(WalletBalances& balances, int& num_blocks) = 0;
+ //! Get balances if possible without waiting for chain and wallet locks.
+ virtual bool tryGetBalances(WalletBalances& balances,
+ int& num_blocks,
+ bool force,
+ int cached_num_blocks) = 0;
//! Get balance.
virtual CAmount getBalance() = 0;
diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp
index 006007be63..d4dc588915 100644
--- a/src/qt/trafficgraphwidget.cpp
+++ b/src/qt/trafficgraphwidget.cpp
@@ -7,6 +7,7 @@
#include <qt/clientmodel.h>
#include <QPainter>
+#include <QPainterPath>
#include <QColor>
#include <QTimer>
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index cb8dd3cc10..506d17ac17 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -77,21 +77,18 @@ void WalletModel::pollBalanceChanged()
// rescan.
interfaces::WalletBalances new_balances;
int numBlocks = -1;
- if (!m_wallet->tryGetBalances(new_balances, numBlocks)) {
+ if (!m_wallet->tryGetBalances(new_balances, numBlocks, fForceCheckBalanceChanged, cachedNumBlocks)) {
return;
}
- if(fForceCheckBalanceChanged || numBlocks != cachedNumBlocks)
- {
- fForceCheckBalanceChanged = false;
+ fForceCheckBalanceChanged = false;
- // Balance and number of transactions might have changed
- cachedNumBlocks = numBlocks;
+ // Balance and number of transactions might have changed
+ cachedNumBlocks = numBlocks;
- checkBalanceChanged(new_balances);
- if(transactionTableModel)
- transactionTableModel->updateConfirmations();
- }
+ checkBalanceChanged(new_balances);
+ if(transactionTableModel)
+ transactionTableModel->updateConfirmations();
}
void WalletModel::checkBalanceChanged(const interfaces::WalletBalances& new_balances)
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 07c2958635..370f02e13b 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -576,6 +576,8 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
result.pushKV("capabilities", aCaps);
UniValue aRules(UniValue::VARR);
+ aRules.push_back("csv");
+ if (!fPreSegWit) aRules.push_back("!segwit");
UniValue vbavailable(UniValue::VOBJ);
for (int j = 0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) {
Consensus::DeploymentPos pos = Consensus::DeploymentPos(j);
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py
index c69c7f90e8..6d72cfc81b 100755
--- a/test/functional/feature_segwit.py
+++ b/test/functional/feature_segwit.py
@@ -107,12 +107,7 @@ class SegWitTest(BitcoinTestFramework):
assert tmpl['sigoplimit'] == 20000
assert tmpl['transactions'][0]['hash'] == txid
assert tmpl['transactions'][0]['sigops'] == 2
- tmpl = self.nodes[0].getblocktemplate({'rules': ['segwit']})
- assert tmpl['sizelimit'] == 1000000
- assert 'weightlimit' not in tmpl
- assert tmpl['sigoplimit'] == 20000
- assert tmpl['transactions'][0]['hash'] == txid
- assert tmpl['transactions'][0]['sigops'] == 2
+ assert '!segwit' not in tmpl['rules']
self.nodes[0].generate(1) # block 162
balance_presetup = self.nodes[0].getbalance()
@@ -212,6 +207,7 @@ class SegWitTest(BitcoinTestFramework):
assert tmpl['sigoplimit'] == 80000
assert tmpl['transactions'][0]['txid'] == txid
assert tmpl['transactions'][0]['sigops'] == 8
+ assert '!segwit' in tmpl['rules']
self.nodes[0].generate(1) # Mine a block to clear the gbt cache