SFFullNode ServiceFlag = 1 << iota
// SFFastSync indicate peer support header first mode
SFFastSync
- SFSpvNode
+ //SFSpvProof indicate peer support spv proof
+ SFSpvProof
// DefaultServices is the server that this node support
- DefaultServices = SFFullNode | SFFastSync
+ DefaultServices = SFFastSync
)
// IsEnable check does the flag support the input flag function
func (f ServiceFlag) IsEnable(checkFlag ServiceFlag) bool {
return f&checkFlag == checkFlag
}
-
}).Warn("fail hand shake due to differnt genesis")
return
}
- if basePeer.ServiceFlag().IsEnable(consensus.SFFullNode) == false {
+ if basePeer.ServiceFlag().IsEnable(consensus.SFFullNode|consensus.SFSpvProof) == false {
log.WithFields(log.Fields{
"peer ServiceFlag": basePeer.ServiceFlag(),
- }).Warn("fail hand shake due to remote peer is not full node")
+ }).Warn("fail hand shake due to remote peer is not full node support spv proof")
return
}
sm.peers.addPeer(basePeer, msg.Height, msg.GetHash())
Moniker: sm.config.Moniker,
Network: sm.config.ChainID,
Version: version.Version,
- Other: []string{strconv.FormatUint(uint64(consensus.SFSpvNode), 10)},
+ Other: []string{strconv.FormatUint(uint64(consensus.DefaultServices), 10)},
}
if !sm.sw.IsListening() {