Skip to content

Commit

Permalink
more deprecated cleanup missed previously
Browse files Browse the repository at this point in the history
  • Loading branch information
ribasushi committed Aug 20, 2024
1 parent 893688a commit d3b1b06
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions build/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/libp2p/go-libp2p/core/peer"

"github.com/filecoin-project/lotus/build/buildconstants"
"github.com/filecoin-project/lotus/lib/addrutil"
)

Expand All @@ -18,8 +19,8 @@ func BuiltinBootstrap() ([]peer.AddrInfo, error) {
if DisableBuiltinAssets {
return nil, nil
}
if BootstrappersFile != "" {
spi, err := bootstrapfs.ReadFile(path.Join("bootstrap", BootstrappersFile))
if buildconstants.BootstrappersFile != "" {
spi, err := bootstrapfs.ReadFile(path.Join("bootstrap", buildconstants.BootstrappersFile))
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion build/forks.go

This file was deleted.

4 changes: 3 additions & 1 deletion build/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"path"

logging "github.com/ipfs/go-log/v2"

"github.com/filecoin-project/lotus/build/buildconstants"
)

// moved from now-defunct build/paramfetch.go
Expand All @@ -14,7 +16,7 @@ var log = logging.Logger("build")
var genesisfs embed.FS

func MaybeGenesis() []byte {
genBytes, err := genesisfs.ReadFile(path.Join("genesis", GenesisFile))
genBytes, err := genesisfs.ReadFile(path.Join("genesis", buildconstants.GenesisFile))
if err != nil {
log.Warnf("loading built-in genesis: %s", err)
return nil
Expand Down
4 changes: 3 additions & 1 deletion build/panic_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (

"github.com/icza/backscanner"
logging "github.com/ipfs/go-log/v2"

"github.com/filecoin-project/lotus/build/buildconstants"
)

var (
Expand Down Expand Up @@ -96,7 +98,7 @@ func writeAppVersion(buildVersion BuildVersion, file string) {
}
defer f.Close() //nolint:errcheck

versionString := []byte(string(buildVersion) + BuildTypeString() + CurrentCommit + "\n")
versionString := []byte(string(buildVersion) + buildconstants.BuildTypeString() + CurrentCommit + "\n")
if _, err := f.Write(versionString); err != nil {
panicLog.Error(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NodeUserVersion() BuildVersion {
return BuildVersion(NodeBuildVersion)
}

return BuildVersion(NodeBuildVersion + BuildTypeString() + CurrentCommit)
return BuildVersion(NodeBuildVersion + buildconstants.BuildTypeString() + CurrentCommit)
}

// MinerBuildVersion is the local build version of the Lotus miner
Expand All @@ -25,7 +25,7 @@ func MinerUserVersion() BuildVersion {
return BuildVersion(MinerBuildVersion)
}

return BuildVersion(MinerBuildVersion + BuildTypeString() + CurrentCommit)
return BuildVersion(MinerBuildVersion + buildconstants.BuildTypeString() + CurrentCommit)
}

var BuildType = buildconstants.BuildType // Deprecated: Use buildconstants.BuildType instead
Expand Down

0 comments on commit d3b1b06

Please sign in to comment.