165{
167
168 po::options_description desc_params(
wallet_args::tr(
"Wallet options"));
176
177 boost::optional<po::variables_map> vm;
178 bool should_terminate = false;
180 argc, argv,
181 "electroneum-gen-multisig [(--testnet|--stagenet)] [--filename-base=<filename>] [--scheme=M/N] [--threshold=M] [--participants=N]",
182 genms::tr(
"This program generates a set of multisig wallets - use this simpler scheme only if all the participants trust each other"),
183 desc_params,
184 boost::program_options::positional_options_description(),
186 "electroneum-gen-multisig.log"
187 );
188 if (!vm)
189 return 1;
190 if (should_terminate)
191 return 0;
192
193 bool testnet, stagenet;
195 std::string basename;
196
199 if (testnet && stagenet)
200 {
202 return 1;
203 }
205 {
207 {
209 return 1;
210 }
211 }
212 if (!(*vm)["threshold"].defaulted())
213 {
215 {
217 return 1;
218 }
220 }
221 if (!(*vm)["participants"].defaulted())
222 {
223 if (total)
224 {
226 return 1;
227 }
229 }
231 {
233 return 1;
234 }
236 {
238 }
239 else
240 {
242 return 1;
243 }
244
247 return 1;
248
249 return 0;
251}
#define CATCH_ENTRY_L0(lacation, return_val)
void add_arg(boost::program_options::options_description &description, const arg_descriptor< T, required, dependent, NUM_DEPS > &arg, bool unique=true)
std::enable_if<!std::is_same< T, bool >::value, bool >::type has_arg(const boost::program_options::variables_map &vm, const arg_descriptor< T, required, dependent, NUM_DEPS > &arg)
T get_arg(const boost::program_options::variables_map &vm, const arg_descriptor< T, false, true > &arg)
const char * tr(const char *str)
const char * tr(const char *str)
std::pair< boost::optional< boost::program_options::variables_map >, bool > main(int argc, char **argv, const char *const usage, const char *const notice, boost::program_options::options_description desc_params, const boost::program_options::positional_options_description &positional_options, const std::function< void(const std::string &, bool)> &print, const char *default_log_name, bool log_to_console)