本文整理汇总了C++中AccountManager::execute方法的典型用法代码示例。如果您正苦于以下问题:C++ AccountManager::execute方法的具体用法?C++ AccountManager::execute怎么用?C++ AccountManager::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccountManager
的用法示例。
在下文中一共展示了AccountManager::execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv)
{
setDefaultOrCLocale();
// Init secp256k1 context by calling one of the functions.
toPublic(Secret{});
// Init defaults
Ethash::init();
NoProof::init();
/// Operating mode.
OperationMode mode = OperationMode::Node;
/// File name for import/export.
string filename;
bool safeImport = false;
/// Hashes/numbers for export range.
string exportFrom = "1";
string exportTo = "latest";
Format exportFormat = Format::Binary;
bool ipc = true;
string jsonAdmin;
ChainParams chainParams;
bool upnp = true;
WithExisting withExisting = WithExisting::Trust;
/// Networking params.
string listenIP;
unsigned short listenPort = dev::p2p::c_defaultListenPort;
string publicIP;
string remoteHost;
unsigned short remotePort = dev::p2p::c_defaultListenPort;
unsigned peers = 11;
unsigned peerStretch = 7;
std::map<p2p::NodeID, pair<NodeIPEndpoint, bool>> preferredNodes;
bool bootstrap = true;
bool disableDiscovery = false;
bool allowLocalDiscovery = false;
static const unsigned NoNetworkID = (unsigned)-1;
unsigned networkID = NoNetworkID;
/// Mining params
unsigned mining = 0;
Address author;
strings presaleImports;
bytes extraData;
/// Transaction params
// TransactionPriority priority = TransactionPriority::Medium;
// double etherPrice = 30.679;
// double blockFees = 15.0;
u256 askPrice = 0;
u256 bidPrice = DefaultGasPrice;
bool alwaysConfirm = true;
/// Wallet password stuff
string masterPassword;
bool masterSet = false;
/// Whisper
bool testingMode = false;
fs::path configFile = getDataDir() / fs::path("config.rlp");
bytes b = contents(configFile);
strings passwordsToNote;
Secrets toImport;
if (b.size())
{
try
{
RLP config(b);
author = config[1].toHash<Address>();
}
catch (...) {}
}
if (argc > 1 && (string(argv[1]) == "wallet" || string(argv[1]) == "account"))
{
AccountManager accountm;
return !accountm.execute(argc, argv);
}
MinerCLI miner(MinerCLI::OperationMode::None);
bool listenSet = false;
bool chainConfigIsSet = false;
fs::path configPath;
string configJSON;
po::options_description clientDefaultMode("CLIENT MODE (default)", c_lineWidth);
auto addClientOption = clientDefaultMode.add_options();
addClientOption("mainnet", "Use the main network protocol");
//.........这里部分代码省略.........