Fantom-foundation/go-lachesis

View on GitHub
poset/poset.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Poset.checkAndSaveEvent has 7 return statements (exceeds 4 allowed).
Open

func (p *Poset) checkAndSaveEvent(e *inter.Event) error {
    if e.Seq <= 1 && e.PrevEpochHash != p.PrevEpoch.Hash() {
        return ErrWrongEpochHash
    }
    if e.Seq > 1 && e.PrevEpochHash != hash.Zero {
Severity: Major
Found in poset/poset.go - About 45 mins to fix

    Method Poset.calcFrameIdx has 6 return statements (exceeds 4 allowed).
    Open

    func (p *Poset) calcFrameIdx(e *inter.Event, checkOnly bool) (frame idx.Frame, isRoot bool) {
        if len(e.Parents) == 0 {
            // special case for very first events in the epoch
            return 1, true
        }
    Severity: Major
    Found in poset/poset.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status