Small fixes on batchspend response

This commit is contained in:
kexkey
2020-07-30 17:03:54 -04:00
parent ebb3f4f7f9
commit 9af47b9940
3 changed files with 10 additions and 8 deletions

View File

@@ -291,13 +291,14 @@ batchspend() {
# NOTYET - feeRate, optional, overrides confTarget if supplied, overrides default value of createbatcher, default to value of createbatcher, default Bitcoin Core value will be used if not supplied
#
# response:
# - txid, the txid of the batch
# - batcherId, id of the executed batcher
# - confTarget, conf_target used for the spend
# - nbOutputs, the number of outputs spent in the batch
# - oldest, the timestamp of the oldest output in the spent batch
# - total, the sum of the spent batch's output amounts
# - txid, the transaction txid
# - txid, the batch transaction id
# - hash, the transaction hash
# - tx details: size, vsize, replaceable, fee
# - tx details: firstseen, size, vsize, replaceable, fee
# - outputs
#
# BODY {}

View File

@@ -399,17 +399,18 @@ main() {
# NOTYET - feeRate, optional, overrides confTarget if supplied, overrides default value of createbatcher, default to value of createbatcher, default Bitcoin Core value will be used if not supplied
#
# response:
# - txid, the transaction txid
# - hash, the transaction hash
# - batcherId, id of the executed batcher
# - confTarget, conf_target used for the spend
# - nbOutputs, the number of outputs spent in the batch
# - oldest, the timestamp of the oldest output in the spent batch
# - total, the sum of the spent batch's output amounts
# - tx details: size, vsize, replaceable, fee
# - txid, the batch transaction id
# - hash, the transaction hash
# - tx details: firstseen, size, vsize, replaceable, fee
# - outputs
#
# {"result":{
# "batcherId":34,
# "batcherLabel":"Special batcher for a special client",
# "confTarget":6,
# "nbOutputs":83,
# "oldest":123123,

View File

@@ -77,7 +77,7 @@ spend() {
trace_rc $?
data="{\"status\":\"accepted\""
data="${data},\"hash\":\"${txid}\",\"details\":{\"address\":\"${address}\",\"amount\":${amount},\"firstseen\":${tx_ts_firstseen},\"size\":${tx_size},\"vsize\":${tx_vsize},\"replaceable\":${tx_replaceable},\"fee\":${fees},\"subtractfeefromamount\":${subtractfeefromamount}}}"
data="${data},\"txid\":\"${txid}\",\"hash\":\"${tx_hash}\",\"details\":{\"address\":\"${address}\",\"amount\":${amount},\"firstseen\":${tx_ts_firstseen},\"size\":${tx_size},\"vsize\":${tx_vsize},\"replaceable\":${tx_replaceable},\"fee\":${fees},\"subtractfeefromamount\":${subtractfeefromamount}}}"
# Delete the temp file containing the raw tx (see above)
rm spend-rawtx-${txid}-$$.blob