Skip to content

Commit 640cd03

Browse files
authored
Feat/delete gossip (#133)
* add delete-gossip action * update cln-application ui to v0.0.6 * bump version * add missing quote * remove sudo * fix delete-gossip action * improve action_result message
1 parent b113f58 commit 640cd03

File tree

4 files changed

+50
-4
lines changed

4 files changed

+50
-4
lines changed

actions/delete-gossip.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
action_result_running=" {
6+
\"version\": \"0\",
7+
\"message\": \"The gossip_store has been deleted. Core Lightning is restarting\",
8+
\"value\": null,
9+
\"copyable\": false,
10+
\"qr\": false
11+
}"
12+
action_result_stopped=" {
13+
\"version\": \"0\",
14+
\"message\": \"The gossip_store has been deleted. On the next service start Core Lightning will rebuild gossip_store from peers\",
15+
\"value\": null,
16+
\"copyable\": false,
17+
\"qr\": false
18+
}"
19+
20+
lightning-cli getinfo >/dev/null 2>/dev/null && EXIT_CODE=$? || EXIT_CODE=$?
21+
22+
if [ $EXIT_CODE -eq 0 ]; then
23+
lightning-cli stop >/dev/null 2>/dev/null || rm /root/.lightning/bitcoin/gossip_store && echo $action_result_running
24+
25+
else
26+
rm /root/.lightning/bitcoin/gossip_store
27+
echo $action_result_stopped
28+
fi
29+

manifest.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: c-lightning
2-
version: 24.08.0
2+
version: 24.08.0.1
33
title: Core Lightning
44
license: BSD-MIT
55
wrapper-repo: https://github.com/Start9Labs/cln-startos
@@ -10,6 +10,8 @@ release-notes: |-
1010
* Update to CLN 24.08 [Release Notes](https://github.com/ElementsProject/lightning/releases/tag/v24.08)
1111
* Update clboss to v0.13.3
1212
* Expose CLNRest in Properties
13+
* Add action to delete corrupted gossip store
14+
* Update cln-application UI to v0.0.6
1315
build: ["make"]
1416
description:
1517
short: "An implementation of the Lightning Network protocol by Blockstream."
@@ -249,6 +251,21 @@ migrations:
249251
type: script
250252
args: ["to"]
251253
actions:
254+
delete-gossip:
255+
name: "Delete Gossip Store"
256+
description: "Deletes gossip_store in the case of corruption"
257+
allowed-statuses:
258+
- running
259+
- stopped
260+
implementation:
261+
type: docker
262+
image: main
263+
system: false
264+
entrypoint: delete-gossip.sh
265+
args: []
266+
io-format: json
267+
mounts:
268+
main: /root/.lightning
252269
generate-rune:
253270
name: "Generate Rune"
254271
warning: This rune has no restrictions! Anyone who has access to this rune could drain funds from your node. Be careful when giving this to apps that you don't trust.
@@ -301,4 +318,4 @@ actions:
301318
description: Depth expressed as a positive number or blockheight prefixed with a hyphen.
302319
masked: false
303320
placeholder: "-600000"
304-
nullable: false
321+
nullable: false

scripts/procedures/migrations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const migration: T.ExpectedExports.migration =
345345
)
346346
},
347347
},
348-
"24.08.0",
348+
"24.08.0.1",
349349
);
350350

351351
function generateRandomString(length: number) {

ui

Submodule ui updated 47 files

0 commit comments

Comments
 (0)