This commit is contained in:
Léo Haf 2025-04-02 12:25:00 +00:00 committed by GitHub
commit ffa1b897a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 1 deletions

View File

@ -88,6 +88,7 @@ COPY ./manager/target/${ARCH}-unknown-linux-musl/release/bitcoind-manager \
./actions/sendcoin.sh \ ./actions/sendcoin.sh \
./actions/sendall.sh \ ./actions/sendall.sh \
./actions/signmessage.sh \ ./actions/signmessage.sh \
/actions/assumeutxo.sh \
./actions/reindex_chainstate.sh \ ./actions/reindex_chainstate.sh \
./actions/prioritise-transaction.sh \ ./actions/prioritise-transaction.sh \
./check-rpc.sh \ ./check-rpc.sh \

28
actions/assumeutxo.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/sh
set -e
cat > input.json
URL=$(jq -r '.["location"]' input.json)
rm input.json
mkdir -p /tmp/snap
if [ -e "/tmp/snap/snapshot" ]; then
bitcoin-cli loadtxoutset /tmp/snap/snapshot &
else
wget -q $URL -O /tmp/snap/snapshot
bitcoin-cli loadtxoutset /tmp/snap/snapshot &
fi
result=" {
\"version\": \"0\",
\"message\": \"Consult the logs to see the progression of the snapshot loading. / DO NOT RESTART UNTIL THE SNAPSHOT IS LOADED.\",
\"value\": null,
\"copyable\": false,
\"qr\": false
}"
echo $result

View File

@ -351,7 +351,28 @@ actions:
description: "The message to sign." description: "The message to sign."
placeholder: "" placeholder: ""
nullable: false nullable: false
assumeutxo:
name: "Assume UTXO"
description: "Use an UTXO snapshot for instant use of your node."
allowed-statuses:
- running
implementation:
type: docker
image: main
system: false
entrypoint: assumeutxo.sh
args: []
io-format: json
mounts:
main: /root/.bitcoin
inject: true
input-spec:
location:
type: string
name: "Snapshot URL"
description: "The URL where we download the snapshot"
placeholder: ""
nullable: false
migrations: migrations:
from: from:
"*": "*":