diff options
| author | necrashter | 2022-04-23 15:11:34 +0300 |
|---|---|---|
| committer | Yigit Sever | 2022-04-23 18:10:12 +0300 |
| commit | 3f5671a3b0833046cad4f4be25d66ec49707a0b6 (patch) | |
| tree | 600585d9d791a5816f924a09a6d8403033e83ee6 | |
| parent | f14c4bc7fc74d39b31b049c10421609e6e048a69 (diff) | |
| download | gradecoin-3f5671a3b0833046cad4f4be25d66ec49707a0b6.tar.gz gradecoin-3f5671a3b0833046cad4f4be25d66ec49707a0b6.tar.bz2 gradecoin-3f5671a3b0833046cad4f4be25d66ec49707a0b6.zip | |
name and url_prefix fields in config
| -rw-r--r-- | config.yaml | 5 | ||||
| -rw-r--r-- | src/config.rs | 4 |
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 | ||
| 2 | name: mainnet | ||
| 3 | # URL Prefix for this network | ||
| 4 | # For example, url_prefix is "example", register at "gradecoin.xyz/example/register" | ||
| 5 | url_prefix: "" | ||
| 1 | # Valid blocks should have this many transactions | 6 | # Valid blocks should have this many transactions |
| 2 | block_transaction_count: 4 | 7 | block_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)] |
| 9 | pub struct Config { | 9 | pub 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 |
