From 97cb0308546cb59014f5357c627de16648a15b93 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 25 Nov 2020 15:04:57 -0800 Subject: [PATCH] wtclient: error on unknown witness type for backup task --- watchtower/wtclient/backup_task.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/watchtower/wtclient/backup_task.go b/watchtower/wtclient/backup_task.go index 5f4385d7..6801d12b 100644 --- a/watchtower/wtclient/backup_task.go +++ b/watchtower/wtclient/backup_task.go @@ -1,6 +1,8 @@ package wtclient import ( + "fmt" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/txscript" @@ -293,6 +295,9 @@ func (t *backupTask) craftSessionPayload( fallthrough case input.CommitmentNoDelay: copy(justiceKit.CommitToRemoteSig[:], signature[:]) + default: + return hint, nil, fmt.Errorf("invalid witness type: %v", + inp.WitnessType()) } }