BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
30 namespace graphene {
namespace wallet {
namespace detail {
35 for(
const string& node_address : nodes )
44 const auto peers = (*_remote_net_node)->get_connected_peers();
45 vector< variant > result;
46 result.reserve( peers.size() );
47 for(
const auto& peer : peers )
51 result.push_back( v );
61 int number_of_accounts = number_of_transactions / 3;
62 number_of_transactions -= number_of_accounts;
68 for(
int i = 0; i < number_of_accounts; ++i )
70 std::ostringstream brain_key;
71 brain_key <<
"brain key for account " << prefix << i;
77 ilog(
"Created ${n} accounts in ${time} milliseconds",
78 (
"n", number_of_accounts)(
"time", (end - start).count() / 1000));
81 for(
int i = 0; i < number_of_accounts; ++i )
87 ilog(
"Transferred to ${n} accounts in ${time} milliseconds",
88 (
"n", number_of_accounts*2)(
"time", (end - start).count() / 1000));
91 for(
int i = 0; i < number_of_accounts; ++i )
96 ilog(
"Issued to ${n} accounts in ${time} milliseconds",
97 (
"n", number_of_accounts)(
"time", (end - start).count() / 1000));
112 elog(
"Caught exception while broadcasting tx ${id}: ${e}",
116 return std::make_pair(tx.
id(),tx);
129 std::cerr <<
"\nCouldn't get network node API. You probably are not configured\n"
130 "to access the network API on the witness_node you are\n"
131 "connecting to. Please follow the instructions in README.md to set up an apiaccess file.\n"
signed_transaction issue_asset(string to_account, string amount, string symbol, string memo, bool broadcast=false)
Used to generate a useful error report when an exception is thrown.
std::string to_string(double)
virtual const transaction_id_type & id() const
static endpoint from_string(const string &s)
fc::api< login_api > _remote_api
void use_network_node_api()
adds a signature to a transaction
void dbg_make_uia(string creator, string symbol)
This class represents an account on the object graph.
vector< variant > network_get_connected_peers()
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
std::string to_detail_string(log_level ll=log_level::all) const
account_multi_index_type my_accounts
signed_transaction create_account_with_brain_key(string brain_key, string account_name, string registrar_account, string referrer_account, bool broadcast=false, bool save_wallet=true)
void network_add_nodes(const vector< string > &nodes)
string name
The account's name. This name must be unique among all account names on the graph....
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
fc::api< network_broadcast_api > _remote_net_broadcast
signed_transaction transfer(string from, string to, string amount, string asset_symbol, string memo, bool broadcast=false)
#define GRAPHENE_MAX_NESTED_OBJECTS
void flood_network(string prefix, uint32_t number_of_transactions)
optional< fc::api< network_node_api > > _remote_net_node
pair< transaction_id_type, signed_transaction > broadcast_transaction(signed_transaction tx)