Skip to content

Commit a8dd2dc

Browse files
committed
loop: correct htlc script version for very old swaps
1 parent 257b5f2 commit a8dd2dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swap.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ func GetHtlcScriptVersion(
5656
protocolVersion loopdb.ProtocolVersion) swap.ScriptVersion {
5757

5858
// If the swap was initiated before we had our v3 script, use v2.
59-
if protocolVersion < loopdb.ProtocolVersionHtlcV3 {
59+
if protocolVersion < loopdb.ProtocolVersionHtlcV3 ||
60+
protocolVersion == loopdb.ProtocolVersionUnrecorded {
61+
6062
return swap.HtlcV2
6163
}
6264

0 commit comments

Comments
 (0)