Commit 5cc46c9
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 79b3976 commit 5cc46c9
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
934 | 939 | | |
935 | 940 | | |
936 | 941 | | |
| |||
943 | 948 | | |
944 | 949 | | |
945 | 950 | | |
946 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
947 | 957 | | |
0 commit comments