Skip to content

Commit

Permalink
correctly mark new actors as "important"
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Oct 14, 2020
1 parent 27aabac commit 6a387e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chain/types/execresult.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package types
import (
"encoding/json"
"fmt"
"regexp"
"runtime"
"strings"
"time"
Expand Down Expand Up @@ -68,11 +69,10 @@ func (l Loc) String() string {
return fmt.Sprintf("%s@%s:%d", fnpkg, file[len(file)-1], l.Line)
}

var importantRegex = regexp.MustCompile(`github.com/filecoin-project/specs-actors/(v\d+/)?actors/builtin`)

func (l Loc) Important() bool {
if strings.HasPrefix(l.Function, "github.com/filecoin-project/specs-actors/actors/builtin") {
return true
}
return false
return importantRegex.MatchString(l.Function)
}

func (gt *GasTrace) MarshalJSON() ([]byte, error) {
Expand Down

0 comments on commit 6a387e1

Please sign in to comment.