aergoio/aergo

View on GitHub
p2p/v030/v032handshake.go

Summary

Maintainability
A
1 hr
Test Coverage
C
79%

Method V032Handshaker.DoForOutbound has 6 return statements (exceeds 4 allowed).
Open

func (h *V032Handshaker) DoForOutbound(ctx context.Context) (*p2pcommon.HandshakeResult, error) {
    h.logger.Debug().Stringer(p2putil.LogPeerID, types.LogPeerShort(h.peerID)).Msg("Starting versioned handshake for outbound peer connection")

    bestBlock, err := h.actor.GetChainAccessor().GetBestBlock()
    if err != nil {
Severity: Major
Found in p2p/v030/v032handshake.go - About 40 mins to fix

    Method V032Handshaker.DoForInbound has 6 return statements (exceeds 4 allowed).
    Open

    func (h *V032Handshaker) DoForInbound(ctx context.Context) (*p2pcommon.HandshakeResult, error) {
        h.logger.Debug().Stringer(p2putil.LogPeerID, types.LogPeerShort(h.peerID)).Msg("Starting versioned handshake for inbound peer connection")
    
        // inbound: receive, check and send
        remotePeerStatus, err := h.receiveRemoteStatus(ctx)
    Severity: Major
    Found in p2p/v030/v032handshake.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status