payjoin / rust-payjoin

Supercharged payment batching to save you fees and preserve your privacy
https://payjoindevkit.org
82 stars 34 forks source link

Print instructions and info on interrupt #303

Closed DanGould closed 1 week ago

DanGould commented 2 weeks ago

Interrupting the program just killed it. Now it prints messages

Before this change, resume even printed "All sessions completed" on interrupt.


I'm not the most pleased with the resume interrupt but it's late and I didn't want to lose the train of thought while I had it. It was hastily put together with an LLM and will need a good review before it's even eligible for merge. Would be nice for 0.0.7-alpha but it's low priority, I just wanted to get a draft working before my mind switched off of it.

DanGould commented 1 week ago

I've adopted your suggestions and also refactored spawn_payjoin_receiver to only tokio::select! over the interruptable block. The diff should be much easier to read