MCPcopy Create free account
hub / github.com/DOSNetwork/core / End

Method End

dosnode/dosnode.go:123–133  ·  view source on GitHub ↗

End is an operation that does a graceful shutdown

()

Source from the content-addressed store, hash-verified

121
122//End is an operation that does a graceful shutdown
123func (d *DosNode) End() {
124 d.m.Lock()
125 defer d.m.Unlock()
126 select {
127 case <-d.ctx.Done():
128 default:
129 d.chain.UnRegisterNode()
130 d.p.Leave()
131 d.cancel()
132 }
133}
134
135func (d *DosNode) Start() {
136 d.logger.Event("peersUpdate", map[string]interface{}{"numOfPeers": 0})

Callers 4

actionStartFunction · 0.95
StartMethod · 0.95
onchainLoopMethod · 0.95
p2pTestMethod · 0.95

Calls 2

UnRegisterNodeMethod · 0.65
LeaveMethod · 0.65

Tested by

no test coverage detected