mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-16 21:06:52 +01:00
handshake/fragment: Remember answered messages, so repair fragments trailing a completed msg1 do not eat the source quota
This commit is contained in:
1 parent
a508a4e22c
commit
3b850c6ecf
5 files changed
+217
-10
No files matched your search
@@ -128,6 +128,11 @@ func (d *Decoder) Has(index int) bool {
|
||||
return index >= 0 && index < MaxSymbols && d.have[index]
|
||||
}
|
||||
|
||||
// Seen returns which symbol indexes are held.
|
||||
func (d *Decoder) Seen() [MaxSymbols]bool {
|
||||
return d.have
|
||||
}
|
||||
|
||||
// Ready reports whether enough symbols have arrived to decode.
|
||||
func (d *Decoder) Ready() bool {
|
||||
return len(d.syms) >= d.layout.K
|
||||
|
||||
Reference in new issue
Block a user