nervosnetwork / fiber

15 stars 8 forks source link

Refactor TLCs related fields in channel state #47

Closed contrun closed 2 months ago

contrun commented 3 months ago

Currently the following two issues https://github.com/contrun/ckb-pcn-node/issues/30 https://github.com/contrun/ckb-pcn-node/issues/31 require us to save TLCs with more information to the channel state. It seems that it would be better if we can save TLC to a single field tlcs instead of pending_offering_tlcs, pending_received_tlcs and to_be_committed_tlcs. But we need also need to save the commitment number when this TLC is added and the commitment number this TLC is removed.

This issue potentially depends on #43 and #44 .

contrun commented 2 months ago

Done in https://github.com/nervosnetwork/cfn-node/pull/72.