mirror of
https://github.com/Retropex/knots-startos.git
synced 2025-05-12 11:20:46 +02:00
Merge 2f7ceb68ec
into 826b8117da
This commit is contained in:
commit
ffa1b897a7
@ -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
28
actions/assumeutxo.sh
Normal 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
|
@ -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:
|
||||
"*":
|
||||
|
Loading…
Reference in New Issue
Block a user