coffee-tools / folgore

Universal Bitcoin backend for core lightning with BIP 157 support full based on the btcli4j Kotlin plugin! Ah, yes it is written in Rust
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

plugin crash while waiting bitcoin core #49

Closed vincenzopalazzo closed 8 months ago

vincenzopalazzo commented 1 year ago

Looks like that the retry logic is not working?

➜  ~ ./run-cln.sh
/home/vincent/github/folgore/target/debug/folgore_plugin error: bad response to getchaininfo (bad 'result' field: Parsing '{result:': object does not have member result), response was {"error":{"code":-1,"data":null,"message":"Ureq(Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"mempool.space\")), port: None, path: \"/api/v1/blocks/tip/height\", query: None, fragment: None }), source: Some(Custom { kind: TimedOut, error: \"timed out reading response\" }) }))"},"id":"cln:getchaininfo#19","jsonrpc":"2.0"}
panic: EOF

goroutine 1 [running]:
github.com/vincenzopalazzo/cln4go/plugin.(*Plugin[...]).Start(0x4a4070)
    /home/vincent/go/pkg/mod/github.com/vincenzopalazzo/cln4go/plugin@v0.0.0-20220815094031-4a3a679dc176/plugin.go:142 +0x92c
main.main()
    /home/vincent/github/bender/cmd/plugin.go:17 +0x500
lightning-cli: Connecting to 'lightning-rpc': Connection refused
vincenzopalazzo commented 8 months ago

This should be fixe by the retry logic https://github.com/coffee-tools/folgore/pull/63