feature: add support for unannounced channels
Askers are able to decide (and price properly) in which market they want to provide liquidity:
- No preference (default)
- Only announced channels
- Only unannounced channels
Bidders can define what kind of channels they are interested in: announced or unannounced (exclusive or)
Ready for a second pass @Roasbeef @guggero Main changes:
- Asker has a new field to specify which market s/he is interested selling the liquidity in
- New channel acceptor to ensure that the new channel matches the announcement constraints.
- Bump latest BatchVersion to signal that the client supports unannounced channels
-
MatchAnnouncementConstraintsonly takes into account if the orders are compatible or not, the server is responsible of filtering clients who do not support unannounced channels yet.
My suggestion would be to add a new enum on the ask order side that has these three values (with the default value of 0 being no_preference) in this PR, that would be covered by the same order version as the unannounced flag. That way all existing ask orders would become no_preference as soon as the maker updates their software (new batch version that signals that they now understand the unannounced flag and actually set it when opening the channel).
This approach SGTM!
@positiveblue, remember to re-request review from reviewers when ready
closed in favor of #385