mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-09 07:56:03 +01:00
bumpfee first draft
This commit is contained in:
@@ -256,6 +256,14 @@ main()
|
||||
response_to_client "${response}" ${?}
|
||||
break
|
||||
;;
|
||||
bumpfee)
|
||||
# POST http://192.168.111.152:8080/bumpfee
|
||||
# BODY {"txid":"af867c86000da76df7ddb1054b273ca9e034e8c89d049b5b2795f9f590f67648","confTarget":4}
|
||||
|
||||
response=$(bumpfee "${line}")
|
||||
response_to_client "${response}" ${?}
|
||||
break
|
||||
;;
|
||||
addtobatch)
|
||||
# POST http://192.168.111.152:8080/addtobatch
|
||||
# BODY {"address":"2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp","amount":0.00233}
|
||||
|
||||
@@ -62,6 +62,32 @@ spend() {
|
||||
return ${returncode}
|
||||
}
|
||||
|
||||
bumpfee() {
|
||||
trace "Entering bumpfee()..."
|
||||
|
||||
local request=${1}
|
||||
local txid=$(echo "${request}" | jq ".txid" | tr -d '"')
|
||||
trace "[bumpfee] txid=${txid}"
|
||||
local confTarget=$(echo "${request}" | jq ".confTarget")
|
||||
trace "[bumpfee] confTarget=${confTarget}"
|
||||
local response
|
||||
|
||||
response=$(send_to_spender_node "{\"method\":\"bumpfee\",\"params\":[\"${txid}\",{\"confTarget\":${confTarget}}]}")
|
||||
local returncode=$?
|
||||
trace_rc ${returncode}
|
||||
trace "[bumpfee] response=${response}"
|
||||
|
||||
if [ "${returncode}" -eq 0 ]; then
|
||||
trace "[bumpfee] error!"
|
||||
else
|
||||
trace "[bumpfee] success!"
|
||||
fi
|
||||
|
||||
echo "${response}"
|
||||
|
||||
return ${returncode}
|
||||
}
|
||||
|
||||
getbalance() {
|
||||
trace "Entering getbalance()..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user