nervosnetwork / fiber

15 stars 8 forks source link

Check number and value of pending htlc #118

Closed quake closed 1 month ago

quake commented 2 months ago

The maximum number of pending htlc must not exceed the OpenChannel/AcceptChannel#max_accept_tlcs, and the value of max_accept_tlcs must not exceed 254, ref: https://github.com/nervosnetwork/cfn-scripts/blob/main/contracts/commitment-lock/README.md, we may change the type of this field to Uint8 also.

The maximum total value of pending htlc must not exceed the OpenChannel/AcceptChannel#max_tlc_value_in_flight