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 // SFSPV indicate peer support spv mode
14 // DefaultServices is the server that this node support
15 DefaultServices = SFFullNode | SFFastSync | SFSPV
18 // IsEnable check does the flag support the input flag function
19 func (f ServiceFlag) IsEnable(checkFlag ServiceFlag) bool {
20 return f&checkFlag == checkFlag