mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopin: mpp pre-swap probe
This commit is contained in:
parent
456a29c523
commit
c8666caf20
12 changed files with 255 additions and 105 deletions
|
|
@ -35,16 +35,20 @@ const (
|
|||
// HTLC v2 scrips for swaps.
|
||||
ProtocolVersionHtlcV2 ProtocolVersion = 5
|
||||
|
||||
// ProtocolVersionMultiLoopIn indicates that the client creates a probe
|
||||
// invoice so that the server can perform a multi-path probe.
|
||||
ProtocolVersionMultiLoopIn ProtocolVersion = 6
|
||||
|
||||
// ProtocolVersionUnrecorded is set for swaps were created before we
|
||||
// started saving protocol version with swaps.
|
||||
ProtocolVersionUnrecorded ProtocolVersion = math.MaxUint32
|
||||
|
||||
// CurrentRpcProtocolVersion defines the version of the RPC protocol
|
||||
// CurrentRPCProtocolVersion defines the version of the RPC protocol
|
||||
// that is currently supported by the loop client.
|
||||
CurrentRPCProtocolVersion = looprpc.ProtocolVersion_HTLC_V2
|
||||
CurrentRPCProtocolVersion = looprpc.ProtocolVersion_MULTI_LOOP_IN
|
||||
|
||||
// CurrentInteranlProtocolVersionInternal defines the RPC current
|
||||
// protocol in the internal representation.
|
||||
// CurrentInternalProtocolVersion defines the RPC current protocol in
|
||||
// the internal representation.
|
||||
CurrentInternalProtocolVersion = ProtocolVersion(CurrentRPCProtocolVersion)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ func TestProtocolVersionSanity(t *testing.T) {
|
|||
ProtocolVersionPreimagePush,
|
||||
ProtocolVersionUserExpiryLoopOut,
|
||||
ProtocolVersionHtlcV2,
|
||||
ProtocolVersionMultiLoopIn,
|
||||
}
|
||||
|
||||
rpcVersions := [...]looprpc.ProtocolVersion{
|
||||
|
|
@ -29,6 +30,7 @@ func TestProtocolVersionSanity(t *testing.T) {
|
|||
looprpc.ProtocolVersion_PREIMAGE_PUSH_LOOP_OUT,
|
||||
looprpc.ProtocolVersion_USER_EXPIRY_LOOP_OUT,
|
||||
looprpc.ProtocolVersion_HTLC_V2,
|
||||
looprpc.ProtocolVersion_MULTI_LOOP_IN,
|
||||
}
|
||||
|
||||
require.Equal(t, len(versions), len(rpcVersions))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue