MCPcopy Create free account
hub / github.com/DNAProject/DNA / SetState

Method SetState

p2pserver/peer/peer.go:193–195  ·  view source on GitHub ↗

SetState set sync state to peer

(state uint32)

Source from the content-addressed store, hash-verified

191
192//SetState set sync state to peer
193func (this *Peer) SetState(state uint32) {
194 atomic.StoreUint32(&(this.linkState), state)
195}
196
197//GetPort return peer`s sync port
198func (this *Peer) GetPort() uint16 {

Callers 15

createPeersFunction · 0.95
TestAddNbrNodeFunction · 0.95
CloseMethod · 0.95
ConnectMethod · 0.95
creatPeersFunction · 0.95
TestVerAckHandleFunction · 0.95
TestAddrReqHandleFunction · 0.95
TestAddrReqHandle_maskokFunction · 0.95
TestNodeEstablishedFunction · 0.80
TestGetNeighborAddrsFunction · 0.80
TestGetNeighborHeightsFunction · 0.80

Calls

no outgoing calls

Tested by 13

createPeersFunction · 0.76
TestAddNbrNodeFunction · 0.76
creatPeersFunction · 0.76
TestVerAckHandleFunction · 0.76
TestAddrReqHandleFunction · 0.76
TestAddrReqHandle_maskokFunction · 0.76
TestNodeEstablishedFunction · 0.64
TestGetNeighborAddrsFunction · 0.64
TestGetNeighborHeightsFunction · 0.64
TestGetNeighborsFunction · 0.64
TestGetNbrNodeCntFunction · 0.64