Skip to content

Commit 21c85bc

Browse files
authored
Merge pull request #571 from bhandras/unrecorded-proto-version-fixup
loop: correct htlc script version for very old swaps
2 parents 843fe82 + a8dd2dc commit 21c85bc

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)