From e45da9f325f3ea4529e5edccaa063f88607f72cb Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 10 Jan 2024 00:57:47 +0800 Subject: [PATCH] :technologist: Make scripts compatible Add header "Content-Type: application/json" for old version of CKB --- bin/generate-blocks.sh | 1 + bin/generate-epochs.sh | 1 + bin/run-dev-miner.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/bin/generate-blocks.sh b/bin/generate-blocks.sh index 51674f8..1a75526 100755 --- a/bin/generate-blocks.sh +++ b/bin/generate-blocks.sh @@ -4,6 +4,7 @@ CKB_RPC_URL="${CKB_RPC_URL:-http://127.0.0.1:8114}" function generate_one() { curl --request POST \ + -H "Content-Type: application/json" \ --url "$CKB_RPC_URL" \ --data '{ "id": 42, diff --git a/bin/generate-epochs.sh b/bin/generate-epochs.sh index 6bdc243..d14917e 100755 --- a/bin/generate-epochs.sh +++ b/bin/generate-epochs.sh @@ -5,6 +5,7 @@ CKB_RPC_URL="${CKB_RPC_URL:-http://127.0.0.1:8114}" function generate() { local n="$(printf '%x' "${1:-1}")" curl --request POST \ + -H "Content-Type: application/json" \ --url http://127.0.0.1:8114/ \ --data '{ "id": 42, diff --git a/bin/run-dev-miner.sh b/bin/run-dev-miner.sh index 72dac5b..c6c512b 100755 --- a/bin/run-dev-miner.sh +++ b/bin/run-dev-miner.sh @@ -6,6 +6,7 @@ set -u function has_tx() { curl --request POST \ + -H "Content-Type: application/json" \ --silent \ --url http://127.0.0.1:8114/ \ --data '{