Merge pull request #4786 from wpaulino/rate-limit-channel-updates

discovery: rate limit incoming channel updates
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2020-11-25 17:07:21 -08:00
commit cefbf5f637
4 files changed
+252 -7

No files matched your search

+5
View File
@@ -47,6 +47,11 @@ const (
ChanUpdateDisabled
)
// IsDisabled determines whether the channel flags has the disabled bit set.
func (c ChanUpdateChanFlags) IsDisabled() bool {
return c&ChanUpdateDisabled == ChanUpdateDisabled
}
// String returns the bitfield flags as a string.
func (c ChanUpdateChanFlags) String() string {
return fmt.Sprintf("%08b", c)