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

Method handleGetMaxPeerBlockHeightReq

p2pserver/actor/server/actor.go:149–157  ·  view source on GitHub ↗

max peer blockheight handler

(ctx actor.Context, req *GetMaxPeerBlockHeightReq)

Source from the content-addressed store, hash-verified

147
148//max peer blockheight handler
149func (this *P2PActor) handleGetMaxPeerBlockHeightReq(ctx actor.Context, req *GetMaxPeerBlockHeightReq) {
150 height := this.server.GetMaxPeerBlockHeight()
151 if ctx.Sender() != nil {
152 resp := &GetMaxPeerBlockHeightRsp{
153 MaxPeerBlockHeight: height,
154 }
155 ctx.Sender().Request(resp, ctx.Self())
156 }
157}
158
159//get id handler
160func (this *P2PActor) handleGetIDReq(ctx actor.Context, req *GetIdReq) {

Callers 1

ReceiveMethod · 0.95

Calls 2

SenderMethod · 0.80
GetMaxPeerBlockHeightMethod · 0.65

Tested by

no test coverage detected