diff --git a/manifest.yaml b/manifest.yaml index d024970..d0e89c0 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -1,14 +1,8 @@ id: bitcoind title: "Bitcoin Core" -version: 25.0.0.2 +version: 25.0.0.3 eos-version: 0.3.4.3 -release-notes: | - * Update to latest upstream (v25.0) - * Reorganize config - * Force pruning for servers with not enough disk space - * Update services base image to alpine 3.16 - * Use ssl for base image packages download - * Optimized higher resolution Bitcoin icon +release-notes: Add back delete-peers action license: MIT wrapper-repo: https://github.com/Start9Labs/bitcoind-wrapper upstream-repo: https://github.com/bitcoin/bitcoin @@ -159,6 +153,13 @@ actions: - stopped implementation: type: script + delete-peers: + name: "Delete Peer List" + description: "Deletes the Peer List (peers.dat) in case it gets corrupted." + allowed-statuses: + - stopped + implementation: + type: script migrations: from: "*": diff --git a/scripts/services/action.ts b/scripts/services/action.ts index 8087164..2459b12 100644 --- a/scripts/services/action.ts +++ b/scripts/services/action.ts @@ -29,4 +29,32 @@ export const action = { }, }; }, + async "delete-peers"( + effect: T.Effects, + _input?: T.Config + ): Promise> { + const peersLocation = { + path: "peers.dat", + volumeId: "main", + }; + if ((await util.exists(effect, peersLocation)) === false) { + return { + result: { + copyable: false, + message: "peers.dat doesn't exist", + version: "0", + qr: false, + }, + }; + } + await effect.removeFile(peersLocation); + return { + result: { + copyable: false, + message: "Deleted peers.dat", + version: "0", + qr: false, + }, + }; + }, }; diff --git a/scripts/services/migrations.ts b/scripts/services/migrations.ts index a44b256..81705d2 100644 --- a/scripts/services/migrations.ts +++ b/scripts/services/migrations.ts @@ -230,5 +230,5 @@ export const migration: T.ExpectedExports.migration = ), }, }, - "25.0.0.2" + "25.0.0.3" );