talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Properly patches sendrawtransaction so it does not crash #220

Closed sr-gi closed 11 months ago

sr-gi commented 1 year ago

Currently, when mocking sendrawtransaction so it does nothing, the client will raise an exception given the picked lambda does not accept any params (and sendrawtransaction has some). Patches it so this does not happen.

This patch is pretty minimal, given the behavior wrt CLN does not change, but it feels better not to except here.

sr-gi commented 1 year ago

The rest were not crashing, but they were logging a bitcoin RPC client crash, given the function called (sendrawtransaction) was expecting no arguments after being mocked, but CLN called it with some (as it is expected).

CLN can recover from this and no side effect was seen, but I think it's best not to force the crash.