examples/chat2-reliable/peer_retrieval.go
Method Chat._doRequestMissingMessageFromStore
has 5 return statements (exceeds 4 allowed). Open
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)
Method Chat.requestMessageFromPeer
has 5 return statements (exceeds 4 allowed). Open
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)