vincenzopalazzo / lampo.rs

lampo (lightning in Italian) is a experimental implementation of a tiny lightning node
http://lampo.devcrew.cc
BSD 3-Clause "New" or "Revised" License
31 stars 14 forks source link

return insufficient funds error #237

Open vincenzopalazzo opened 1 month ago

vincenzopalazzo commented 1 month ago

We do not take into count the case when we do not have enough balance to fund a channel

2024-05-29T17:50:37.662Z DEBUG bitcoincore_rpc JSON-RPC error for fundrawtransaction: RpcError { code: -4, message: "Insufficient funds", data: None }. [/home/vincent/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitcoincore-rpc-0.17.0/src/client.rs:1342]
2024-05-29T17:50:37.663Z ERROR lampod JSON-RPC error: RPC error response: RpcError { code: -4, message: "Insufficient funds", data: None }. [lampod/src/lib.rs:256]
2024-05-29T17:50:37.663Z TRACE ldk lightning_background_processor:850 TRACE Persisting ChannelManager.... [lampod/src/utils/logger.rs:50]

We should emit an error, and unlock the fundchannel command that it is waiting for us

chrisguida commented 1 week ago

I'll look at this tomorrow