mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
Merge pull request #5364 from kittywhiskers/py_bump
build: downgrade to python 3.8, consistently use focal across images and documentation
This commit is contained in:
commit
d4f2c354b6
@ -29,9 +29,9 @@ task:
|
|||||||
functional_test_script:
|
functional_test_script:
|
||||||
- ./test/functional/test_runner.py --jobs 9 --ci --extended --exclude feature_dbcrash --combinedlogslen=1000 --quiet --failfast
|
- ./test/functional/test_runner.py --jobs 9 --ci --extended --exclude feature_dbcrash --combinedlogslen=1000 --quiet --failfast
|
||||||
task:
|
task:
|
||||||
name: "x86_64 Linux [GOAL: install] [bionic] [Using ./ci/ system]"
|
name: "x86_64 Linux [GOAL: install] [focal] [Using ./ci/ system]"
|
||||||
container:
|
container:
|
||||||
image: ubuntu:18.04
|
image: ubuntu:focal
|
||||||
cpu: 8
|
cpu: 8
|
||||||
memory: 8G
|
memory: 8G
|
||||||
timeout_in: 60m
|
timeout_in: 60m
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
base: ubuntu:16.04
|
base: ubuntu:focal
|
||||||
language: c++
|
language: c++
|
||||||
engine: libFuzzer
|
engine: libFuzzer
|
||||||
environment:
|
environment:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
image: "ubuntu:bionic"
|
image: "ubuntu:focal"
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
|
@ -1 +1 @@
|
|||||||
3.10.2
|
3.8.16
|
||||||
|
16
.travis.yml
16
.travis.yml
@ -183,7 +183,7 @@ install:
|
|||||||
- ls -lah $HOST_CACHE_DIR && ls -lah $HOST_CACHE_DIR/depends && ls -lah $HOST_CACHE_DIR/ccache && ls -lah $HOST_CACHE_DIR/docker
|
- ls -lah $HOST_CACHE_DIR && ls -lah $HOST_CACHE_DIR/depends && ls -lah $HOST_CACHE_DIR/ccache && ls -lah $HOST_CACHE_DIR/docker
|
||||||
# Load cached builder image
|
# Load cached builder image
|
||||||
- if [ -f $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz ]; then zcat $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz | docker load || true; fi
|
- if [ -f $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz ]; then zcat $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz | docker load || true; fi
|
||||||
- travis_retry docker pull ubuntu:bionic
|
- travis_retry docker pull ubuntu:focal
|
||||||
- travis_retry docker build -t $BUILDER_IMAGE_NAME --build-arg=USER_ID=$UID --build-arg=GROUP_ID=$UID --build-arg=BUILD_TARGET=$BUILD_TARGET -f contrib/containers/ci/Dockerfile ci
|
- travis_retry docker build -t $BUILDER_IMAGE_NAME --build-arg=USER_ID=$UID --build-arg=GROUP_ID=$UID --build-arg=BUILD_TARGET=$BUILD_TARGET -f contrib/containers/ci/Dockerfile ci
|
||||||
before_script:
|
before_script:
|
||||||
# Make sure stdout is in blocking mode. Otherwise builds will fail due to large writes to stdout
|
# Make sure stdout is in blocking mode. Otherwise builds will fail due to large writes to stdout
|
||||||
@ -204,7 +204,7 @@ after_success:
|
|||||||
env:
|
env:
|
||||||
cache: false
|
cache: false
|
||||||
language: python
|
language: python
|
||||||
python: '3.5' # Oldest supported version according to doc/dependencies.md
|
python: '3.8' # Oldest supported version according to doc/dependencies.md
|
||||||
install:
|
install:
|
||||||
- set -o errexit; source ./ci/lint/04_install.sh
|
- set -o errexit; source ./ci/lint/04_install.sh
|
||||||
before_script:
|
before_script:
|
||||||
@ -213,14 +213,14 @@ after_success:
|
|||||||
- set -o errexit; source ./ci/lint/06_script.sh
|
- set -o errexit; source ./ci/lint/06_script.sh
|
||||||
|
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'ARM [GOAL: install] [bionic] [unit tests, functional tests]'
|
name: 'ARM [GOAL: install] [focal] [unit tests, functional tests]'
|
||||||
arch: arm64
|
arch: arm64
|
||||||
env: >-
|
env: >-
|
||||||
FILE_ENV="./ci/test/00_setup_env_arm.sh"
|
FILE_ENV="./ci/test/00_setup_env_arm.sh"
|
||||||
QEMU_USER_CMD="" # Can run the tests natively without qemu
|
QEMU_USER_CMD="" # Can run the tests natively without qemu
|
||||||
|
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'S390x [GOAL: install] [bionic] [unit tests, functional tests]'
|
name: 'S390x [GOAL: install] [focal] [unit tests, functional tests]'
|
||||||
arch: s390x
|
arch: s390x
|
||||||
env: >-
|
env: >-
|
||||||
FILE_ENV="./ci/test/00_setup_env_s390x.sh"
|
FILE_ENV="./ci/test/00_setup_env_s390x.sh"
|
||||||
@ -242,7 +242,7 @@ after_success:
|
|||||||
FILE_ENV="./ci/test/00_setup_env_native_centos.sh"
|
FILE_ENV="./ci/test/00_setup_env_native_centos.sh"
|
||||||
|
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
|
name: 'x86_64 Linux [GOAL: install] [focal] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
|
||||||
env: >-
|
env: >-
|
||||||
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
|
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
|
||||||
# x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan))
|
# x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan))
|
||||||
@ -253,17 +253,17 @@ after_success:
|
|||||||
TEST_RUNNER_EXTRA="--exclude feature_block" # Not enough memory on travis machines
|
TEST_RUNNER_EXTRA="--exclude feature_block" # Not enough memory on travis machines
|
||||||
# x86_64 Linux (no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer)
|
# x86_64 Linux (no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer)
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
|
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
|
||||||
env: >-
|
env: >-
|
||||||
FILE_ENV="./ci/test/00_setup_env_native_asan.sh"
|
FILE_ENV="./ci/test/00_setup_env_native_asan.sh"
|
||||||
|
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
|
name: 'x86_64 Linux [GOAL: install] [focal] [no wallet]'
|
||||||
env: >-
|
env: >-
|
||||||
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
|
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
|
||||||
|
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, fuzzers under valgrind]'
|
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, fuzzers under valgrind]'
|
||||||
env: >-
|
env: >-
|
||||||
FILE_ENV="./ci/test/00_setup_env_native_fuzz_with_valgrind.sh"
|
FILE_ENV="./ci/test/00_setup_env_native_fuzz_with_valgrind.sh"
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
|
|||||||
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
|
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
|
||||||
export RUN_INTEGRATION_TESTS=${RUN_INTEGRATION_TESTS:-true}
|
export RUN_INTEGRATION_TESTS=${RUN_INTEGRATION_TESTS:-true}
|
||||||
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
||||||
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04}
|
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:focal}
|
||||||
# Randomize test order.
|
# Randomize test order.
|
||||||
# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
|
# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
|
||||||
export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
|
export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
|
||||||
|
@ -6,14 +6,10 @@
|
|||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
export PACKAGES="clang-8 llvm-8 python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||||
export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163)
|
export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163)
|
||||||
export GOAL="install"
|
export GOAL="install"
|
||||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=thread"
|
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=thread"
|
||||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||||
export PYZMQ=true
|
export PYZMQ=true
|
||||||
|
|
||||||
# xenial comes with old clang versions that can not parse the sanitizer suppressions files
|
|
||||||
# Remove unparseable lines as a hacky workaround
|
|
||||||
sed -i '/^implicit-/d' "${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan"
|
|
||||||
|
@ -99,8 +99,8 @@ AC_PATH_TOOL(RANLIB, ranlib)
|
|||||||
AC_PATH_TOOL(STRIP, strip)
|
AC_PATH_TOOL(STRIP, strip)
|
||||||
AC_PATH_TOOL(GCOV, gcov)
|
AC_PATH_TOOL(GCOV, gcov)
|
||||||
AC_PATH_PROG(LCOV, lcov)
|
AC_PATH_PROG(LCOV, lcov)
|
||||||
dnl Python 3.5 is specified in .python-version and should be used if available, see doc/dependencies.md
|
dnl Python 3.8 is specified in .python-version and should be used if available, see doc/dependencies.md
|
||||||
AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python])
|
AC_PATH_PROGS([PYTHON], [python3.8 python3.9 python3.10 python3.11 python3.12 python3 python])
|
||||||
AC_PATH_PROG(GENHTML, genhtml)
|
AC_PATH_PROG(GENHTML, genhtml)
|
||||||
AC_PATH_PROG([GIT], [git])
|
AC_PATH_PROG([GIT], [git])
|
||||||
AC_PATH_PROG(CCACHE,ccache)
|
AC_PATH_PROG(CCACHE,ccache)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM phusion/baseimage:bionic-1.0.0
|
FROM phusion/baseimage:focal-1.0.0
|
||||||
LABEL maintainer="Dash Developers <dev@dash.org>"
|
LABEL maintainer="Dash Developers <dev@dash.org>"
|
||||||
LABEL description="Dockerised DashCore, built from Travis"
|
LABEL description="Dockerised DashCore, built from Travis"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:focal
|
||||||
LABEL maintainer="Dash Developers <dev@dash.org>"
|
LABEL maintainer="Dash Developers <dev@dash.org>"
|
||||||
LABEL description="Dockerised DashCore"
|
LABEL description="Dockerised DashCore"
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Once you've got the right hardware and software:
|
|||||||
|
|
||||||
# Create base images
|
# Create base images
|
||||||
cd gitian-builder
|
cd gitian-builder
|
||||||
bin/make-base-vm --suite bionic --arch amd64
|
bin/make-base-vm --suite focal --arch amd64
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)
|
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)
|
||||||
|
@ -4,7 +4,7 @@ Cross-compiliation of Dash Core
|
|||||||
Dash Core can be cross-compiled on Linux to all other supported host systems. This is done by changing
|
Dash Core can be cross-compiled on Linux to all other supported host systems. This is done by changing
|
||||||
the `HOST` parameter when building the dependencies and then specifying another `--prefix` directory when building Dash.
|
the `HOST` parameter when building the dependencies and then specifying another `--prefix` directory when building Dash.
|
||||||
|
|
||||||
The following instructions are only tested on Debian Stretch and Ubuntu Bionic.
|
The following instructions are only tested on Debian Stretch and Ubuntu Focal.
|
||||||
|
|
||||||
macOS Cross-compilation
|
macOS Cross-compilation
|
||||||
------------------------
|
------------------------
|
||||||
@ -67,7 +67,7 @@ The first step is to install the mingw-w64 cross-compilation tool chain:
|
|||||||
|
|
||||||
sudo apt install g++-mingw-w64-x86-64
|
sudo apt install g++-mingw-w64-x86-64
|
||||||
|
|
||||||
Ubuntu Bionic 18.04 <sup>[1](#footnote1)</sup>:
|
Ubuntu Focal 20.04 <sup>[1](#footnote1)</sup>:
|
||||||
|
|
||||||
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.
|
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ Below are some notes on how to build Dash Core for Windows.
|
|||||||
|
|
||||||
The options known to work for building Dash Core on Windows are:
|
The options known to work for building Dash Core on Windows are:
|
||||||
|
|
||||||
* On Linux, using the [Mingw-w64](https://mingw-w64.org/doku.php) cross compiler tool chain. Ubuntu Bionic 18.04 is required
|
* On Linux, using the [Mingw-w64](https://mingw-w64.org/doku.php) cross compiler tool chain. Ubuntu Focal 20.04 is required
|
||||||
and is the platform used to build the Dash Core Windows release binaries.
|
and is the platform used to build the Dash Core Windows release binaries.
|
||||||
* On Windows, using [Windows
|
* On Windows, using [Windows
|
||||||
Subsystem for Linux (WSL)](https://docs.microsoft.com/windows/wsl/about) and the Mingw-w64 cross compiler tool chain.
|
Subsystem for Linux (WSL)](https://docs.microsoft.com/windows/wsl/about) and the Mingw-w64 cross compiler tool chain.
|
||||||
@ -38,7 +38,7 @@ To install WSL on Windows 10 with Fall Creators Update installed (version >= 162
|
|||||||
* Enable 'Windows Subsystem for Linux'
|
* Enable 'Windows Subsystem for Linux'
|
||||||
* Click 'OK' and restart if necessary
|
* Click 'OK' and restart if necessary
|
||||||
2. Install Ubuntu
|
2. Install Ubuntu
|
||||||
* Open Microsoft Store and search for "Ubuntu 18.04" or use [this link](https://www.microsoft.com/store/productId/9N9TNGVNDL3Q)
|
* Open Microsoft Store and search for "Ubuntu 20.04" or use [this link](https://www.microsoft.com/store/productId/9MTTCL66CPXJ)
|
||||||
* Click Install
|
* Click Install
|
||||||
3. Complete Installation
|
3. Complete Installation
|
||||||
* Open a cmd prompt and type "Ubuntu1804"
|
* Open a cmd prompt and type "Ubuntu1804"
|
||||||
|
@ -20,7 +20,7 @@ These are the dependencies currently used by Dash Core. You can find instruction
|
|||||||
| librsvg | | | | | |
|
| librsvg | | | | | |
|
||||||
| MiniUPnPc | [2.2.2](https://miniupnp.tuxfamily.org/files) | | No | | |
|
| MiniUPnPc | [2.2.2](https://miniupnp.tuxfamily.org/files) | | No | | |
|
||||||
| PCRE | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) |
|
| PCRE | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) |
|
||||||
| Python (tests) | | [3.5](https://www.python.org/downloads) | | | |
|
| Python (tests) | | [3.8](https://www.python.org/downloads) | | | |
|
||||||
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |
|
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |
|
||||||
| Qt | [5.12.11](https://download.qt.io/official_releases/qt/) | [5.5.1](https://github.com/bitcoin/bitcoin/issues/13478) | No | | |
|
| Qt | [5.12.11](https://download.qt.io/official_releases/qt/) | [5.5.1](https://github.com/bitcoin/bitcoin/issues/13478) | No | | |
|
||||||
| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | |
|
| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | |
|
||||||
|
@ -331,7 +331,7 @@ Execute the following as user `debian`:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd gitian-builder
|
cd gitian-builder
|
||||||
bin/make-base-vm --lxc --arch amd64 --suite bionic
|
bin/make-base-vm --lxc --arch amd64 --suite focal
|
||||||
```
|
```
|
||||||
|
|
||||||
There will be a lot of warnings printed during the build of the image. These can be ignored.
|
There will be a lot of warnings printed during the build of the image. These can be ignored.
|
||||||
@ -383,7 +383,7 @@ Output from `gbuild` will look something like
|
|||||||
Resolving deltas: 100% (41590/41590), done.
|
Resolving deltas: 100% (41590/41590), done.
|
||||||
From https://github.com/dashpay/dash
|
From https://github.com/dashpay/dash
|
||||||
... (new tags, new branch etc)
|
... (new tags, new branch etc)
|
||||||
--- Building for bionic amd64 ---
|
--- Building for focal amd64 ---
|
||||||
Stopping target if it is up
|
Stopping target if it is up
|
||||||
Making a new image copy
|
Making a new image copy
|
||||||
stdin: is not a tty
|
stdin: is not a tty
|
||||||
@ -432,14 +432,14 @@ So, if you use LXC:
|
|||||||
export PATH="$PATH":/path/to/gitian-builder/libexec
|
export PATH="$PATH":/path/to/gitian-builder/libexec
|
||||||
export USE_LXC=1
|
export USE_LXC=1
|
||||||
cd /path/to/gitian-builder
|
cd /path/to/gitian-builder
|
||||||
./libexec/make-clean-vm --suite bionic --arch amd64
|
./libexec/make-clean-vm --suite focal --arch amd64
|
||||||
|
|
||||||
LXC_ARCH=amd64 LXC_SUITE=bionic on-target -u root apt-get update
|
LXC_ARCH=amd64 LXC_SUITE=focal on-target -u root apt-get update
|
||||||
LXC_ARCH=amd64 LXC_SUITE=bionic on-target -u root \
|
LXC_ARCH=amd64 LXC_SUITE=focal on-target -u root \
|
||||||
-e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
|
-e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
|
||||||
$( sed -ne '/^packages:/,/[^-] .*/ {/^- .*/{s/"//g;s/- //;p}}' ../dash/contrib/gitian-descriptors/*|sort|uniq )
|
$( sed -ne '/^packages:/,/[^-] .*/ {/^- .*/{s/"//g;s/- //;p}}' ../dash/contrib/gitian-descriptors/*|sort|uniq )
|
||||||
LXC_ARCH=amd64 LXC_SUITE=bionic on-target -u root apt-get -q -y purge grub
|
LXC_ARCH=amd64 LXC_SUITE=focal on-target -u root apt-get -q -y purge grub
|
||||||
LXC_ARCH=amd64 LXC_SUITE=bionic on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
|
LXC_ARCH=amd64 LXC_SUITE=focal on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
And then set offline mode for apt-cacher-ng:
|
And then set offline mode for apt-cacher-ng:
|
||||||
|
@ -32,7 +32,7 @@ don't have test cases for.
|
|||||||
- When subclassing the BitcoinTestFramwork, place overrides for the
|
- When subclassing the BitcoinTestFramwork, place overrides for the
|
||||||
`set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of
|
`set_test_params()`, `add_options()` and `setup_xxxx()` methods at the top of
|
||||||
the subclass, then locally-defined helper methods, then the `run_test()` method.
|
the subclass, then locally-defined helper methods, then the `run_test()` method.
|
||||||
- Use `'{}'.format(x)` for string formatting, not `'%s' % x`.
|
- Use `f'{x}'` for string formatting in preference to `'{}'.format(x)` or `'%s' % x`.
|
||||||
|
|
||||||
#### Naming guidelines
|
#### Naming guidelines
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ class FullBlockTest(BitcoinTestFramework):
|
|||||||
# Allow the block to mature
|
# Allow the block to mature
|
||||||
blocks = []
|
blocks = []
|
||||||
for i in range(NUM_BUFFER_BLOCKS_TO_GENERATE):
|
for i in range(NUM_BUFFER_BLOCKS_TO_GENERATE):
|
||||||
blocks.append(self.next_block("maturitybuffer.{}".format(i)))
|
blocks.append(self.next_block(f"maturitybuffer.{i}"))
|
||||||
self.save_spendable_output()
|
self.save_spendable_output()
|
||||||
self.send_blocks(blocks)
|
self.send_blocks(blocks)
|
||||||
|
|
||||||
@ -161,8 +161,8 @@ class FullBlockTest(BitcoinTestFramework):
|
|||||||
if template.valid_in_block:
|
if template.valid_in_block:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.log.info("Reject block with invalid tx: %s", TxTemplate.__name__)
|
self.log.info(f"Reject block with invalid tx: {TxTemplate.__name__}")
|
||||||
blockname = "for_invalid.%s" % TxTemplate.__name__
|
blockname = f"for_invalid.{TxTemplate.__name__}"
|
||||||
badblock = self.next_block(blockname)
|
badblock = self.next_block(blockname)
|
||||||
badtx = template.get_tx()
|
badtx = template.get_tx()
|
||||||
self.sign_tx(badtx, attempt_spend_tx)
|
self.sign_tx(badtx, attempt_spend_tx)
|
||||||
@ -1364,12 +1364,12 @@ class FullBlockTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
# save the current tip so it can be spent by a later block
|
# save the current tip so it can be spent by a later block
|
||||||
def save_spendable_output(self):
|
def save_spendable_output(self):
|
||||||
self.log.debug("saving spendable output %s" % self.tip.vtx[0])
|
self.log.debug(f"saving spendable output {self.tip.vtx[0]}")
|
||||||
self.spendable_outputs.append(self.tip)
|
self.spendable_outputs.append(self.tip)
|
||||||
|
|
||||||
# get an output that we previously marked as spendable
|
# get an output that we previously marked as spendable
|
||||||
def get_spendable_output(self):
|
def get_spendable_output(self):
|
||||||
self.log.debug("getting spendable output %s" % self.spendable_outputs[0].vtx[0])
|
self.log.debug(f"getting spendable output {self.spendable_outputs[0].vtx[0]}")
|
||||||
return self.spendable_outputs.pop(0).vtx[0]
|
return self.spendable_outputs.pop(0).vtx[0]
|
||||||
|
|
||||||
# move the tip back to a previous block
|
# move the tip back to a previous block
|
||||||
|
Loading…
Reference in New Issue
Block a user