watchtower/wtpolicy: add IsAnchorChannel helper

This commit is contained in:
Conner Fromknecht committed 2020-11-25 15:04:23 -08:00
1 parent dd325f04d2
commit 74416c63f8
2 files changed
+24

No files matched your search

+5
View File
@@ -120,6 +120,11 @@ func (p Policy) String() string {
p.SweepFeeRate)
}
// IsAnchorChannel returns true if the session policy requires anchor channels.
func (p Policy) IsAnchorChannel() bool {
return p.TxPolicy.BlobType.IsAnchorChannel()
}
// Validate ensures that the policy satisfies some minimal correctness
// constraints.
func (p Policy) Validate() error {