3 // ServiceFlag use uint64 to indicate what kind of server this node can provide.
4 // one uint64 can represent 64 type of service flag
5 type ServiceFlag uint64
8 // SFFullNode is a flag used to indicate a peer is a full node.
9 SFFullNode ServiceFlag = 1 << iota
10 // SFFastSync indicate peer support header first mode
12 // DefaultServices is the server that this node support
13 DefaultServices = SFFullNode | SFFastSync
16 // IsEnable check does the flag support the input flag function
17 func (f ServiceFlag) IsEnable(checkFlag ServiceFlag) bool {
18 return f&checkFlag == checkFlag