nervosnetwork / fiber

15 stars 8 forks source link

Retry querying funding transaction status after timeout (also persist unconfirmed funding channel info) #146

Open contrun opened 2 weeks ago

contrun commented 2 weeks ago

Currently, the funding transaction has to have 4 confirmations in 60s https://github.com/contrun/fiber/blob/0f6c5f5e18532a1b3b520788eb9168cbbace179d/src/fiber/network.rs#L1302-L1307 https://github.com/contrun/fiber/blob/0f6c5f5e18532a1b3b520788eb9168cbbace179d/src/fiber/network.rs#L63

We need to enlarge this time duration so that we can successfully process funding transaction confirmation event. This unconfirmed funding transaction information has to be persisted, because otherwise we can't handle the node being shutdown immediately after broadcasting funding transaction while before funding transaction being confirmed.