aergoio/aergo

View on GitHub
p2p/v030/v030io.go

Summary

Maintainability
A
1 hr
Test Coverage
C
79%

Method V030ReadWriter.WriteMsg has 7 return statements (exceeds 4 allowed).
Open

func (rw *V030ReadWriter) WriteMsg(msg p2pcommon.Message) error {
    writeN := 0
    if msg.Length() != uint32(len(msg.Payload())) {
        return fmt.Errorf("Invalid payload size")
    }
Severity: Major
Found in p2p/v030/v030io.go - About 45 mins to fix

    Method V030ReadWriter.ReadMsg has 6 return statements (exceeds 4 allowed).
    Open

    func (rw *V030ReadWriter) ReadMsg() (p2pcommon.Message, error) {
        readN := 0
        // fill data
        read, err := rw.readToLen(rw.readBuf[:], msgHeaderLength)
        if err != nil {
    Severity: Major
    Found in p2p/v030/v030io.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status