Commit Graph

5 Commits (65fe06cec207578538a7ef69bbda338ca5117101)

Author SHA1 Message Date
Elle Mouton 65fe06cec2 loopd: verify loop out amount
This commit adds validation that checks if the loop out amount specified can
be satisfied given the nodes current channel balances.
3 years ago
Elle Mouton 5399e60554 loopd: verify that dest addr is for correct chain
This commit adds verification to the loop out request to ensure that the
formatting of the specified destination address matches the network that
lnd is running on.
3 years ago
Elle Mouton 5c34dd1177 loopd: refactor loop out request validation
This commit moves loop out request validation for labels and
confirmation targets into its own function for the purpose of easy
testing and also to make the additions of future request validation easy
to add and test.
3 years ago
carla fc99c8b320
multi: add confirmation target to loop in 4 years ago
carla f726fc2bc8
loopd: add missing zero case to validateConfTarget
Update validate function to return default target for zero value
confirmation targets, as indicated by the comment. This change
introduces a behaviour change for direct rpc calls to loopd (ie,
those not made by the loop cli tool). Previously, these calls
would fail and indicate that the conf target must be > 2, now
they will succeed with the default conf target. The loop cli
tool is unaffected because we already set the default value.

When clients upgrade from a previous version of loopd which did
not have this check, preexisting loops will be unaffected, because
loop ins had the default of 6 confirmations set, and loop outs with
<2 conf target would not have been created.
4 years ago