Added ac-eras parameter, which enables multiple reward eras by allowing other ac_reward releated parameters to accept comma separated lists of values, one for each era

This commit is contained in:
Michael Toutonghi
2018-04-09 22:48:54 -07:00
parent 4ca9edc0d6
commit 36647d52f7
5 changed files with 230 additions and 74 deletions

View File

@@ -157,6 +157,17 @@ inline bool IsSwitchChar(char c)
#endif
}
/**
* Return string argument or default value
*
* @param strVal string to split
* @param outVals array of numbers from string or default
* if the string is null, nDefault is used for all array entries
* else if the string has fewer than _MAX_ERAS entries, then the last
* entry fills remaining entries
*/
void SplitToi64(const std::string& strVal, int64_t[_MAX_ERAS]& outVals, int64_t nDefault);
/**
* Return string argument or default value
*