Skip to content

Commit

Permalink
Merge pull request #182 from oasisprotocol/kostko/feature/get-chain-c…
Browse files Browse the repository at this point in the history
…ontext
  • Loading branch information
kostko committed Mar 30, 2021
2 parents cb4d759 + deea3cb commit f6427ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changelog/180.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oasis: Use GetChainContext method instead of fetching genesis document
5 changes: 2 additions & 3 deletions oasis/oasis.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,11 @@ func (c *grpcClient) GetChainID(ctx context.Context) (string, error) {
defer c.Unlock()

client := consensus.NewConsensusClient(conn)
genesis, err := client.GetGenesisDocument(ctx)
c.chainID, err = client.GetChainContext(ctx)
if err != nil {
logger.Debug("GetChainID: failed to get genesis document", "err", err)
logger.Debug("GetChainID: failed to get chain context", "err", err)
return "", err
}
c.chainID = genesis.ChainContext()
return c.chainID, nil
}

Expand Down

0 comments on commit f6427ee

Please sign in to comment.