tendermint/peer/filter.go

21 lines
403 B
Go
Raw Normal View History

2014-06-24 17:28:40 -07:00
package peer
2014-06-25 21:37:20 -07:00
import (
. "github.com/tendermint/tendermint/binary"
)
2014-06-24 17:28:40 -07:00
/* 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
}