| 129 | } |
| 130 | |
| 131 | func (fc *FaucetConfig) fixConfig() { |
| 132 | if fc == nil { |
| 133 | return |
| 134 | } |
| 135 | |
| 136 | if fc.AddressDailyQuota == 0 || fc.AccountDailyQuota == 0 { |
| 137 | log.Warning("the AddressDailyQuota & AccountDailyQuota should be valid positive number, set to 1 by default") |
| 138 | |
| 139 | if fc.AddressDailyQuota == 0 { |
| 140 | fc.AddressDailyQuota = 1 |
| 141 | } |
| 142 | if fc.AccountDailyQuota == 0 { |
| 143 | fc.AccountDailyQuota = 1 |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | return |
| 148 | } |
| 149 | |
| 150 | // LoadConfig load the common covenantsql client config again for extra faucet config. |
| 151 | func LoadConfig(listenAddr string, configPath string) (config *Config, err error) { |