Skip to content

Commit

Permalink
Merge pull request #348 from celestiaorg/hlib/set-genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Jan 21, 2022
2 parents 97ae328 + fd6fd73 commit f05e0c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node/services/config.go
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/libp2p/go-libp2p-core/peer"
"github.com/multiformats/go-multiaddr"
tmbytes "github.com/tendermint/tendermint/libs/bytes"

"github.com/celestiaorg/celestia-node/build"
)

type Config struct {
Expand Down Expand Up @@ -40,5 +42,8 @@ func (cfg *Config) trustedPeer() (*peer.AddrInfo, error) {
}

func (cfg *Config) trustedHash() (tmbytes.HexBytes, error) {
if cfg.TrustedHash == "" {
return hex.DecodeString(build.Genesis())
}
return hex.DecodeString(cfg.TrustedHash)
}

0 comments on commit f05e0c2

Please sign in to comment.