Merge pull request #2431 from cfromknecht/keyring-remote-delay-retribution

lnwallet: Add keyring and remote CSV delay to BreachRetribution
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2019-01-11 15:33:16 -08:00
commit 400a1d3282
2 files changed
+25

No files matched your search

+11
View File
@@ -1891,6 +1891,15 @@ type BreachRetribution struct {
// HtlcRetributions is a slice of HTLC retributions for each output
// active HTLC output within the breached commitment transaction.
HtlcRetributions []HtlcRetribution
// KeyRing contains the derived public keys used to construct the
// breaching commitment transaction. This allows downstream clients to
// have access to the public keys used in the scripts.
KeyRing *CommitmentKeyRing
// RemoteDelay specifies the CSV delay applied to to-local scripts on
// the breaching commitment transaction.
RemoteDelay uint32
}
// NewBreachRetribution creates a new fully populated BreachRetribution for the
@@ -2098,6 +2107,8 @@ func NewBreachRetribution(chanState *channeldb.OpenChannel, stateNum uint64,
RemoteOutpoint: remoteOutpoint,
RemoteOutputSignDesc: remoteSignDesc,
HtlcRetributions: htlcRetributions,
KeyRing: keyRing,
RemoteDelay: remoteDelay,
}, nil
}