Merge pull request #35 from Retropex/assumeutxo
Some checks failed
Build Service / BuildPackage (push) Has been cancelled

add assume UTXO support
This commit is contained in:
Léo Haf 2025-04-10 08:21:34 +02:00 committed by GitHub
commit 55371af06b
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/sendall.sh \
./actions/signmessage.sh \
./actions/assumeutxo.sh \
./actions/reindex_chainstate.sh \
./actions/prioritise-transaction.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
download_and_load() {
mkdir -p /tmp/snap
rm -rf /tmp/snap/snapshot
wget -q $URL -O /tmp/snap/snapshot
bitcoin-cli loadtxoutset /tmp/snap/snapshot
}
download_and_load &
result=" {
\"version\": \"0\",
\"message\": \"Consult the logs to see if the snapshot the progression. Do not restart knots until the snapshot is loaded. If the snapshot is invalid nothing will happen.\",
\"value\": null,
\"copyable\": false,
\"qr\": false
}"
echo $result

View File

@ -351,7 +351,28 @@ actions:
description: "The message to sign."
placeholder: ""
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:
from:
"*":