Commit e5d9d91
committed
Validate all common fields in LSPS1
Add missing cross-validation of `LSPS1OrderParams` against
`LSPS1Options` as required by bLIP-51:
- Check `required_channel_confirmations` >= `min_required_channel_confirmations`
- Check `funding_confirms_within_blocks` >= `min_funding_confirms_within_blocks`
- Check total channel balance (`lsp_balance_sat` + `client_balance_sat`)
is within [`min_channel_balance_sat`, `max_channel_balance_sat`],
using `checked_add` to guard against overflow
Co-Authored-By: HAL 9000is_valid order check1 parent d89c1af commit e5d9d91
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
932 | 937 | | |
933 | 938 | | |
934 | 939 | | |
| |||
941 | 946 | | |
942 | 947 | | |
943 | 948 | | |
944 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
945 | 955 | | |
0 commit comments