waku-org/go-waku

View on GitHub
examples/chat2-reliable/peer_retrieval.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Chat._doRequestMissingMessageFromStore has 5 return statements (exceeds 4 allowed).
Open

func (c *Chat) _doRequestMissingMessageFromStore(messageID string) error {
    ctx, cancel := context.WithTimeout(c.ctx, 10*time.Second)
    defer cancel()

    hash, err := base64.URLEncoding.DecodeString(messageID)
Severity: Major
Found in examples/chat2-reliable/peer_retrieval.go - About 35 mins to fix

    Method Chat.requestMessageFromPeer has 5 return statements (exceeds 4 allowed).
    Open

    func (c *Chat) requestMessageFromPeer(peerID peer.ID, messageID string) (*pb.Message, error) {
        ctx, cancel := context.WithTimeout(c.ctx, 30*time.Second)
        defer cancel()
    
        stream, err := c.node.Host().NewStream(ctx, peerID, messageRequestProtocolID)
    Severity: Major
    Found in examples/chat2-reliable/peer_retrieval.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status