wtclient: error on unknown witness type for backup task

This commit is contained in:
Conner Fromknecht 2020-11-25 15:04:57 -08:00
parent 74416c63f8
commit 97cb030854
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -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())
}
}