Skip to content

Commit

Permalink
🧑‍💻 Make scripts compatible
Browse files Browse the repository at this point in the history
Add header "Content-Type: application/json" for old version of CKB
  • Loading branch information
doitian committed Jan 9, 2024
1 parent 70c54aa commit e45da9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/generate-blocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions bin/generate-epochs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions bin/run-dev-miner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '{
Expand Down

0 comments on commit e45da9f

Please sign in to comment.