diff --git a/blockchain.go b/blockchain.go index f4c45b5..7633a6f 100644 --- a/blockchain.go +++ b/blockchain.go @@ -47,7 +47,7 @@ var blockchainSubdirectory string * CreatorPublicKey|1:a3c07ef6cbee246f231a61ff36bbcd8e8563723e3703eb345ecdd933d7709ae2 * Version|1 * - * Of these, only the Creator field is optional. By default, for new block, it is taken + * Of these, only the Creator field is optional. By default, for new blocks, it is taken * from the "BlockCreator" field in the pubkey metadata (if it exists). */ diff --git a/chainparams.example.json b/chainparams.example.json index 7ebb507..ea840e8 100644 --- a/chainparams.example.json +++ b/chainparams.example.json @@ -1,5 +1,6 @@ { "creator": "Ivan Voras ", "genesis_block_timestamp": "2018-08-16T12:49:32+02:00", - "bootstrap_peers": [ "cosmos.ivoras.net:2017" ] -} \ No newline at end of file + "bootstrap_peers": [ "cosmos.ivoras.net:2017" ], + "description": "The Mighty Blockchain" +} diff --git a/chainparams.go b/chainparams.go index 0199ba0..a5d5dd4 100644 --- a/chainparams.go +++ b/chainparams.go @@ -16,4 +16,7 @@ type ChainParams struct { // List of host:port string specifying default peers for this blockchain. If empty, the defaults are used. BootstrapPeers []string `json:"bootstrap_peers"` + + // Description of the blockchain (e.g. its purpose) + Description string `json:"description"` } diff --git a/cliactions.go b/cliactions.go index b405693..3fa1bca 100644 --- a/cliactions.go +++ b/cliactions.go @@ -282,6 +282,10 @@ func actionNewChain(jsonFilename string) { if err != nil { log.Fatal(err) } + err = dbSetMetaString(db, "Description", ncp.Description) + if err != nil { + log.Fatal(err) + } if len(ncp.BootstrapPeers) > 0 { // bootstrapPeers is required to be filled in before dbInit()