mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
Merge bitcoin/bitcoin#27887: [25.x] Backports
6233049709ci: Switch to `amd64` container in "ARM" task (Hennadii Stepanov)d845a3ed21test: add coverage for `/deploymentinfo` passing a blockhash (brunoerg)72ead8699frest: bugfix, fix crash error when calling `/deploymentinfo` (brunoerg)6f7a0ae58bci: Use podman stop over podman kill (MarcoFalke)de56daab41ci: Use podman for persistent workers (MarcoFalke)71f626ef2cci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN (MarcoFalke) Pull request description: Currently backports: * https://github.com/bitcoin/bitcoin/pull/27777 * https://github.com/bitcoin/bitcoin/pull/27844 * https://github.com/bitcoin/bitcoin/pull/27853 * https://github.com/bitcoin/bitcoin/pull/27886 Effectively also backports: https://github.com/bitcoin/bitcoin/pull/27562. ACKs for top commit: stickies-v: ACK6233049709Tree-SHA512: d0f3d5c4cd0cf9792f3270078b49ad6661e28e7a883f91e5981e8cfe95d01c6e415762ee2e3a5fea17d198299989a8b5412961c2cc788cef975b2ee45d84550c
This commit is contained in:
12
.cirrus.yml
12
.cirrus.yml
@@ -193,15 +193,13 @@ task:
|
||||
task:
|
||||
name: 'ARM [unit tests, no functional tests] [bullseye]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
arm_container:
|
||||
image: debian:bullseye
|
||||
cpu: 2
|
||||
memory: 8G
|
||||
# docker_arguments: # Can use dockerfile after https://github.com/cirruslabs/cirrus-ci-docs/issues/1154
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: debian:bullseye
|
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
|
||||
<< : *CREDITS_TEMPLATE
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
|
||||
QEMU_USER_CMD: "" # Disable qemu and run the test natively
|
||||
|
||||
task:
|
||||
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
|
||||
|
||||
@@ -40,7 +40,9 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
|
||||
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
|
||||
echo "Restart docker before run to stop and clear all containers started with --rm"
|
||||
systemctl restart docker
|
||||
podman container stop --all # Similar to "systemctl restart docker"
|
||||
echo "Prune all dangling images"
|
||||
docker image prune --force
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
@@ -628,7 +628,7 @@ static bool rest_deploymentinfo(const std::any& context, HTTPRequest* req, const
|
||||
return RESTERR(req, HTTP_BAD_REQUEST, "Block not found");
|
||||
}
|
||||
|
||||
jsonRequest.params.pushKV("blockhash", hash_str);
|
||||
jsonRequest.params.push_back(hash_str);
|
||||
}
|
||||
|
||||
req->WriteHeader("Content-Type", "application/json");
|
||||
|
||||
@@ -421,6 +421,10 @@ class RESTTest (BitcoinTestFramework):
|
||||
deployment_info = self.nodes[0].getdeploymentinfo()
|
||||
assert_equal(deployment_info, self.test_rest_request('/deploymentinfo'))
|
||||
|
||||
previous_bb_hash = self.nodes[0].getblockhash(self.nodes[0].getblockcount() - 1)
|
||||
deployment_info = self.nodes[0].getdeploymentinfo(previous_bb_hash)
|
||||
assert_equal(deployment_info, self.test_rest_request(f"/deploymentinfo/{previous_bb_hash}"))
|
||||
|
||||
non_existing_blockhash = '42759cde25462784395a337460bde75f58e73d3f08bd31fdc3507cbac856a2c4'
|
||||
resp = self.test_rest_request(f'/deploymentinfo/{non_existing_blockhash}', ret_type=RetType.OBJ, status=400)
|
||||
assert_equal(resp.read().decode('utf-8').rstrip(), "Block not found")
|
||||
|
||||
Reference in New Issue
Block a user