ZmnSCPxj / clboss

Automated Core Lightning Node Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OnchainFundsAnnouncer::fundpsbt tries old interface and generates spurious warning

ksedgwic opened this issue · comments

Source has the following comment:

		/* On old C-Lightning, "reserve" is a bool.
		 * Try that first.
		 * If we get a parameter error -32602,
		 * try with a number 0.
		 */

Generates the following:

plugin-clboss: Rpc out: fundpsbt {\"satoshi\": \"all\", \"feerate\": \"normal\", \"startweight\": 214, \"minconf\": 3, \"reserve\": false}
plugin-clboss: Rpc in: fundpsbt {\"satoshi\": \"all\", \"feerate\": \"normal\", \"startweight\": 214, \"minconf\": 3, \"reserve\": false} => error {\"code\":-32602,\"message\":\"reserve: should be an integer: invalid token 'false'\"}
plugin-clboss: Rpc out: fundpsbt {\"satoshi\": \"all\", \"feerate\": \"normal\", \"startweight\": 214, \"minconf\": 3, \"reserve\": 0}
plugin-clboss: Rpc in: fundpsbt {\"satoshi\": \"all\", \"feerate\": \"normal\", \"startweight\": 214, \"minconf\": 3, \"reserve\": 0} => {\"psbt\":\"cHNidP8BALACAAAAAwvxNMx8BjgNJGNjvSWLMQ2UUmEp4vaG1/JI6KuMlR3cAQAAAAABAAAAuet9uTmCzXIbfgTRfSL4CosQaAQN417HeivxTQATTLgDAAAAAP3///+yzRHoA9JDUusOqRYAIwp4+if...

The bool version was deprecated in CLN v23.02, we should remove it.