diff --git a/.cirrus.yml b/.cirrus.yml index 680024d155c..21b5d0a0265 100644 --- a/.cirrus.yml +++ b/.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]' diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 1024222e96a..9237ea443b2 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -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 diff --git a/src/rest.cpp b/src/rest.cpp index e46406f1ade..feb4ad70832 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -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"); diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index 5017f77d18e..3ab7c0928ef 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -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")