mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
network > chain_id, put in genesis.json
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
dbm "github.com/tendermint/tendermint/db"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
@ -27,7 +29,7 @@ func Status() (*ctypes.ResponseStatus, error) {
|
||||
|
||||
return &ctypes.ResponseStatus{
|
||||
Moniker: config.GetString("moniker"),
|
||||
Network: config.GetString("network"),
|
||||
ChainID: config.GetString("chain_id"),
|
||||
Version: config.GetString("version"),
|
||||
GenesisHash: genesisHash,
|
||||
PubKey: privValidator.PubKey,
|
||||
@ -57,3 +59,14 @@ func NetInfo() (*ctypes.ResponseNetInfo, error) {
|
||||
Peers: peers,
|
||||
}, nil
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// returns pointer because the rpc-gen code returns nil (TODO!)
|
||||
func Genesis() (*string, error) {
|
||||
b, err := ioutil.ReadFile(config.GetString("genesis_file"))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return &string(b), nil
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ type Receipt struct {
|
||||
|
||||
type ResponseStatus struct {
|
||||
Moniker string `json:"moniker"`
|
||||
Network string `json:"network"`
|
||||
ChainID string `json:"chain_id"`
|
||||
Version string `json:"version"`
|
||||
GenesisHash []byte `json:"genesis_hash"`
|
||||
PubKey account.PubKey `json:"pub_key"`
|
||||
|
Reference in New Issue
Block a user