aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornecrashter2022-04-23 15:11:34 +0300
committerYigit Sever2022-04-23 18:10:12 +0300
commit3f5671a3b0833046cad4f4be25d66ec49707a0b6 (patch)
tree600585d9d791a5816f924a09a6d8403033e83ee6
parentf14c4bc7fc74d39b31b049c10421609e6e048a69 (diff)
downloadgradecoin-3f5671a3b0833046cad4f4be25d66ec49707a0b6.tar.gz
gradecoin-3f5671a3b0833046cad4f4be25d66ec49707a0b6.tar.bz2
gradecoin-3f5671a3b0833046cad4f4be25d66ec49707a0b6.zip
name and url_prefix fields in config
-rw-r--r--config.yaml5
-rw-r--r--src/config.rs4
2 files changed, 9 insertions, 0 deletions
diff --git a/config.yaml b/config.yaml
index 9aa73f3..b60691a 100644
--- a/config.yaml
+++ b/config.yaml
@@ -1,3 +1,8 @@
1# The name of the network
2name: mainnet
3# URL Prefix for this network
4# For example, url_prefix is "example", register at "gradecoin.xyz/example/register"
5url_prefix: ""
1# Valid blocks should have this many transactions 6# Valid blocks should have this many transactions
2block_transaction_count: 4 7block_transaction_count: 4
3# Bonus awarded after registration 8# Bonus awarded after registration
diff --git a/src/config.rs b/src/config.rs
index 10c054c..e6f5e0e 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -7,6 +7,10 @@ use log::{error, info};
7/// Configuration for a single network 7/// Configuration for a single network
8#[derive(Debug, Serialize, Deserialize, Clone, Default)] 8#[derive(Debug, Serialize, Deserialize, Clone, Default)]
9pub struct Config { 9pub struct Config {
10 // Name of the network
11 pub name: String,
12 // URL prefix for this network, can be empty
13 pub url_prefix: String,
10 // Valid blocks should have this many transactions 14 // Valid blocks should have this many transactions
11 pub block_transaction_count: u8, 15 pub block_transaction_count: u8,
12 // Inital registration bonus 16 // Inital registration bonus