From 2faaf3c239905b9f8e7cfa324dcd16d158386ade Mon Sep 17 00:00:00 2001 From: BitcoinMechanic Date: Fri, 11 Oct 2024 16:50:48 -0700 Subject: [PATCH] add prioritise transaction action --- actions/prioritise-transaction.sh | 12 ++++++++++++ manifest.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 actions/prioritise-transaction.sh diff --git a/actions/prioritise-transaction.sh b/actions/prioritise-transaction.sh new file mode 100644 index 00000000..9e26504e --- /dev/null +++ b/actions/prioritise-transaction.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +cat > input.json +TXID=$(jq -r '.["txid"]' input.json) +FEE_DELTA=$(jq -r '.["fee-delta"]' input.json) +rm input.json + +bitcoin-cli prioritisetransaction $TXID $FEE_DELTA + +echo "Transaction prioritised with fee $FEE_DELTA" \ No newline at end of file diff --git a/manifest.yaml b/manifest.yaml index 1794d01c..caf8e9d4 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -161,6 +161,37 @@ actions: - stopped implementation: type: script + prioritise-transaction: + name: "Prioritise Transaction" + description: "Ensure a transaction gets prioritised in generated templates." + allowed-statuses: + - running + - stopped + implementation: + type: docker + image: main + system: false + entrypoint: prioritise-transaction.sh + args: [] + io-format: json + mounts: + main: /root/.bitcoin + input-spec: + txid: + type: string + name: TXID + description: "The transaction ID of the transaction you wish to prioritise." + masked: false + placeholder: "" + nullable: false + fee-delta: + type: string + name: Fee-Delta + description: "The effective fee rate you wish your Bitcoin node to treat this transaction as having." + masked: true + placeholder: "" + nullable: false + default: "" migrations: from: "*":