tendermint/peer/filter.go
Jae Kwon c895c6a586 .
2014-06-25 21:37:20 -07:00

21 lines
403 B
Go

package peer
import (
. "github.com/tendermint/tendermint/binary"
)
/* Filter
A Filter could be a bloom filter for lossy filtering, or could be a lossless filter.
Either way, it's used to keep track of what a peer knows of.
*/
type Filter interface {
Binary
Add(Msg)
Has(Msg) bool
// Loads a new filter.
// Convenience factory method
Load(ByteSlice) Filter
}