File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -51,20 +51,25 @@ post_status() {
5151 if [[ -z " $CENO_STATUS_API_BASE_URL " ]]; then
5252 return
5353 fi
54- echo " [post_status] POST ${endpoint} payload=${payload} " >&2
54+ local payload_file payload_size
55+ payload_file=" $( mktemp) "
56+ printf ' %s' " $payload " > " $payload_file "
57+ payload_size=" $( wc -c < " $payload_file " | tr -d ' [:space:]' ) "
58+ echo " [post_status] POST ${endpoint} payload_size=${payload_size} B" >&2
5559 local response status
5660 response=$( curl -sS -w " %{http_code}" -o /tmp/post_status_resp.$$ \
5761 -X POST \
5862 -H " Content-Type: application/json" \
5963 ${CENO_STATUS_API_KEY: +-H " Authorization: Bearer ${CENO_STATUS_API_KEY} " } \
60- -d " $payload " \
64+ --data-binary " @ ${payload_file} " \
6165 " ${CENO_STATUS_API_BASE_URL} /${endpoint} " )
6266 status=" $response "
6367 echo " [post_status] status=${status} " >&2
6468 if [[ -s /tmp/post_status_resp.$$ ]]; then
6569 echo " [post_status] response=$( cat /tmp/post_status_resp.$$ ) " >&2
6670 fi
6771 rm -f /tmp/post_status_resp.$$
72+ rm -f " $payload_file "
6873}
6974
7075echo " [prove_block.sh] Starting proof at $( date -Is) with BIN=$BIN_PATH " >&2
You can’t perform that action at this time.
0 commit comments