input: update CommitSpendNoDelay to be aware of tweakless commits, add new witness type

In this commit, we update the `CommitSpendNoDelay` method to be aware of
the alternate spending mechanism for commitments that don't have a tweak
for the remote party's non-delay output. We also add a new witness type
so callers can convey their expected signing path.
This commit is contained in:
Olaoluwa Osuntokun
2019-07-31 20:02:52 -07:00
parent a9541b8f6a
commit bee777ab5f
3 changed files with 42 additions and 9 deletions

View File

@@ -259,6 +259,8 @@ func getInputWitnessSizeUpperBound(inp input.Input) (int, bool, error) {
switch inp.WitnessType() {
// Outputs on a remote commitment transaction that pay directly to us.
case input.CommitSpendNoDelayTweakless:
fallthrough
case input.WitnessKeyHash:
fallthrough
case input.CommitmentNoDelay: