Fix sidechain_type declarations
This commit is contained in:
parent
23c4eba59b
commit
3f9bc31cd8
20 changed files with 106 additions and 100 deletions
|
|
@ -160,8 +160,8 @@ class database_api_impl : public std::enable_shared_from_this<database_api_impl>
|
|||
// Sidechain addresses
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses(const vector<sidechain_address_id_type>& sidechain_address_ids)const;
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_account(account_id_type account)const;
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_sidechain(sidechain_type sidechain)const;
|
||||
fc::optional<sidechain_address_object> get_sidechain_address_by_account_and_sidechain(account_id_type account, sidechain_type sidechain)const;
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_sidechain(peerplays_sidechain::sidechain_type sidechain)const;
|
||||
fc::optional<sidechain_address_object> get_sidechain_address_by_account_and_sidechain(account_id_type account, peerplays_sidechain::sidechain_type sidechain)const;
|
||||
uint64_t get_sidechain_addresses_count()const;
|
||||
|
||||
// Votes
|
||||
|
|
@ -1865,12 +1865,12 @@ vector<optional<sidechain_address_object>> database_api_impl::get_sidechain_addr
|
|||
return result;
|
||||
}
|
||||
|
||||
vector<optional<sidechain_address_object>> database_api::get_sidechain_addresses_by_sidechain(sidechain_type sidechain)const
|
||||
vector<optional<sidechain_address_object>> database_api::get_sidechain_addresses_by_sidechain(peerplays_sidechain::sidechain_type sidechain)const
|
||||
{
|
||||
return my->get_sidechain_addresses_by_sidechain( sidechain );
|
||||
}
|
||||
|
||||
vector<optional<sidechain_address_object>> database_api_impl::get_sidechain_addresses_by_sidechain(sidechain_type sidechain)const
|
||||
vector<optional<sidechain_address_object>> database_api_impl::get_sidechain_addresses_by_sidechain(peerplays_sidechain::sidechain_type sidechain)const
|
||||
{
|
||||
vector<optional<sidechain_address_object>> result;
|
||||
const auto& sidechain_addresses_range = _db.get_index_type<sidechain_address_index>().indices().get<by_sidechain>().equal_range(sidechain);
|
||||
|
|
@ -1881,12 +1881,12 @@ vector<optional<sidechain_address_object>> database_api_impl::get_sidechain_addr
|
|||
return result;
|
||||
}
|
||||
|
||||
fc::optional<sidechain_address_object> database_api::get_sidechain_address_by_account_and_sidechain(account_id_type account, sidechain_type sidechain)const
|
||||
fc::optional<sidechain_address_object> database_api::get_sidechain_address_by_account_and_sidechain(account_id_type account, peerplays_sidechain::sidechain_type sidechain)const
|
||||
{
|
||||
return my->get_sidechain_address_by_account_and_sidechain( account, sidechain );
|
||||
}
|
||||
|
||||
fc::optional<sidechain_address_object> database_api_impl::get_sidechain_address_by_account_and_sidechain(account_id_type account, sidechain_type sidechain)const
|
||||
fc::optional<sidechain_address_object> database_api_impl::get_sidechain_address_by_account_and_sidechain(account_id_type account, peerplays_sidechain::sidechain_type sidechain)const
|
||||
{
|
||||
const auto& idx = _db.get_index_type<sidechain_address_index>().indices().get<by_account_and_sidechain>();
|
||||
auto itr = idx.find( boost::make_tuple( account, sidechain ) );
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ class database_api
|
|||
* @param sidechain Sidechain for which addresses should be retrieved
|
||||
* @return The sidechain addresses objects, or null if the sidechain does not have any addresses
|
||||
*/
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_sidechain(sidechain_type sidechain)const;
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_sidechain(peerplays_sidechain::sidechain_type sidechain)const;
|
||||
|
||||
/**
|
||||
* @brief Get the sidechain addresses for a given account and sidechain
|
||||
|
|
@ -661,7 +661,7 @@ class database_api
|
|||
* @param sidechain Sidechain for which address should be retrieved
|
||||
* @return The sidechain addresses objects, or null if the account does not have a sidechain addresses for a given sidechain
|
||||
*/
|
||||
fc::optional<sidechain_address_object> get_sidechain_address_by_account_and_sidechain(account_id_type account, sidechain_type sidechain)const;
|
||||
fc::optional<sidechain_address_object> get_sidechain_address_by_account_and_sidechain(account_id_type account, peerplays_sidechain::sidechain_type sidechain)const;
|
||||
|
||||
/**
|
||||
* @brief Get the total number of sidechain addresses registered with the blockchain
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace graphene { namespace chain {
|
|||
|
||||
asset fee;
|
||||
account_id_type sidechain_address_account;
|
||||
sidechain_type sidechain;
|
||||
graphene::peerplays_sidechain::sidechain_type sidechain;
|
||||
string deposit_address;
|
||||
string withdraw_address;
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ namespace graphene { namespace chain {
|
|||
asset fee;
|
||||
sidechain_address_id_type sidechain_address_id;
|
||||
account_id_type sidechain_address_account;
|
||||
sidechain_type sidechain;
|
||||
graphene::peerplays_sidechain::sidechain_type sidechain;
|
||||
optional<string> deposit_address;
|
||||
optional<string> withdraw_address;
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ namespace graphene { namespace chain {
|
|||
asset fee;
|
||||
sidechain_address_id_type sidechain_address_id;
|
||||
account_id_type sidechain_address_account;
|
||||
sidechain_type sidechain;
|
||||
graphene::peerplays_sidechain::sidechain_type sidechain;
|
||||
|
||||
account_id_type fee_payer()const { return sidechain_address_account; }
|
||||
share_type calculate_fee(const fee_parameters_type& k)const { return 0; }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace graphene { namespace chain {
|
|||
std::string url;
|
||||
vesting_balance_id_type deposit;
|
||||
public_key_type signing_key;
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
vesting_balance_id_type pay_vb;
|
||||
|
||||
account_id_type fee_payer()const { return owner_account; }
|
||||
|
|
@ -30,7 +30,7 @@ namespace graphene { namespace chain {
|
|||
optional<std::string> new_url;
|
||||
optional<vesting_balance_id_type> new_deposit;
|
||||
optional<public_key_type> new_signing_key;
|
||||
optional<flat_map<sidechain_type, string>> new_sidechain_public_keys;
|
||||
optional<flat_map<peerplays_sidechain::sidechain_type, string>> new_sidechain_public_keys;
|
||||
optional<vesting_balance_id_type> new_pay_vb;
|
||||
|
||||
account_id_type fee_payer()const { return owner_account; }
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace graphene { namespace chain {
|
|||
account_id_type payer;
|
||||
|
||||
son_wallet_id_type son_wallet_id;
|
||||
sidechain_type sidechain;
|
||||
graphene::peerplays_sidechain::sidechain_type sidechain;
|
||||
string address;
|
||||
|
||||
account_id_type fee_payer()const { return payer; }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace graphene { namespace chain {
|
|||
|
||||
son_id_type son_id;
|
||||
fc::time_point_sec timestamp;
|
||||
sidechain_type sidechain;
|
||||
peerplays_sidechain::sidechain_type sidechain;
|
||||
std::string sidechain_uid;
|
||||
std::string sidechain_transaction_id;
|
||||
std::string sidechain_from;
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ namespace graphene { namespace chain {
|
|||
|
||||
son_id_type son_id;
|
||||
fc::time_point_sec timestamp;
|
||||
sidechain_type sidechain;
|
||||
peerplays_sidechain::sidechain_type sidechain;
|
||||
std::string peerplays_uid;
|
||||
std::string peerplays_transaction_id;
|
||||
chain::account_id_type peerplays_from;
|
||||
chain::asset peerplays_asset;
|
||||
sidechain_type withdraw_sidechain;
|
||||
peerplays_sidechain::sidechain_type withdraw_sidechain;
|
||||
std::string withdraw_address;
|
||||
std::string withdraw_currency;
|
||||
safe<int64_t> withdraw_amount;
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ namespace graphene { namespace chain {
|
|||
static const uint8_t type_id = sidechain_address_object_type;
|
||||
|
||||
account_id_type sidechain_address_account;
|
||||
sidechain_type sidechain;
|
||||
graphene::peerplays_sidechain::sidechain_type sidechain;
|
||||
string deposit_address;
|
||||
string withdraw_address;
|
||||
|
||||
sidechain_address_object() :
|
||||
sidechain(sidechain_type::bitcoin),
|
||||
sidechain(graphene::peerplays_sidechain::sidechain_type::bitcoin),
|
||||
deposit_address(""),
|
||||
withdraw_address("") {}
|
||||
};
|
||||
|
|
@ -44,17 +44,17 @@ namespace graphene { namespace chain {
|
|||
member<sidechain_address_object, account_id_type, &sidechain_address_object::sidechain_address_account>
|
||||
>,
|
||||
ordered_non_unique< tag<by_sidechain>,
|
||||
member<sidechain_address_object, sidechain_type, &sidechain_address_object::sidechain>
|
||||
member<sidechain_address_object, peerplays_sidechain::sidechain_type, &sidechain_address_object::sidechain>
|
||||
>,
|
||||
ordered_unique< tag<by_account_and_sidechain>,
|
||||
composite_key<sidechain_address_object,
|
||||
member<sidechain_address_object, account_id_type, &sidechain_address_object::sidechain_address_account>,
|
||||
member<sidechain_address_object, sidechain_type, &sidechain_address_object::sidechain>
|
||||
member<sidechain_address_object, peerplays_sidechain::sidechain_type, &sidechain_address_object::sidechain>
|
||||
>
|
||||
>,
|
||||
ordered_unique< tag<by_sidechain_and_deposit_address>,
|
||||
composite_key<sidechain_address_object,
|
||||
member<sidechain_address_object, sidechain_type, &sidechain_address_object::sidechain>,
|
||||
member<sidechain_address_object, peerplays_sidechain::sidechain_type, &sidechain_address_object::sidechain>,
|
||||
member<sidechain_address_object, std::string, &sidechain_address_object::deposit_address>
|
||||
>
|
||||
>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@ enum class sidechain_type {
|
|||
|
||||
} }
|
||||
|
||||
namespace graphene { namespace peerplays_sidechain {
|
||||
|
||||
using sidechain_type = graphene::chain::sidechain_type;
|
||||
|
||||
} }
|
||||
|
||||
FC_REFLECT_ENUM(graphene::chain::sidechain_type,
|
||||
(bitcoin)
|
||||
(ethereum)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace graphene { namespace chain {
|
|||
son_id_type son_id;
|
||||
uint64_t total_votes = 0;
|
||||
public_key_type signing_key;
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
bool operator==(const son_info& rhs) {
|
||||
bool son_sets_equal =
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace graphene { namespace chain {
|
|||
vesting_balance_id_type pay_vb;
|
||||
son_statistics_id_type statistics;
|
||||
son_status status = son_status::inactive;
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
void pay_son_fee(share_type pay, database& db);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace graphene { namespace chain {
|
|||
static const uint8_t type_id = son_wallet_deposit_object_type;
|
||||
|
||||
time_point_sec timestamp;
|
||||
sidechain_type sidechain;
|
||||
peerplays_sidechain::sidechain_type sidechain;
|
||||
std::string sidechain_uid;
|
||||
std::string sidechain_transaction_id;
|
||||
std::string sidechain_from;
|
||||
|
|
@ -45,7 +45,7 @@ namespace graphene { namespace chain {
|
|||
member<object, object_id_type, &object::id>
|
||||
>,
|
||||
ordered_non_unique< tag<by_sidechain>,
|
||||
member<son_wallet_deposit_object, sidechain_type, &son_wallet_deposit_object::sidechain>
|
||||
member<son_wallet_deposit_object, peerplays_sidechain::sidechain_type, &son_wallet_deposit_object::sidechain>
|
||||
>,
|
||||
ordered_unique< tag<by_sidechain_uid>,
|
||||
member<son_wallet_deposit_object, std::string, &son_wallet_deposit_object::sidechain_uid>
|
||||
|
|
@ -55,7 +55,7 @@ namespace graphene { namespace chain {
|
|||
>,
|
||||
ordered_non_unique< tag<by_sidechain_and_processed>,
|
||||
composite_key<son_wallet_deposit_object,
|
||||
member<son_wallet_deposit_object, sidechain_type, &son_wallet_deposit_object::sidechain>,
|
||||
member<son_wallet_deposit_object, peerplays_sidechain::sidechain_type, &son_wallet_deposit_object::sidechain>,
|
||||
member<son_wallet_deposit_object, bool, &son_wallet_deposit_object::processed>
|
||||
>
|
||||
>
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ namespace graphene { namespace chain {
|
|||
static const uint8_t type_id = son_wallet_withdraw_object_type;
|
||||
|
||||
time_point_sec timestamp;
|
||||
sidechain_type sidechain;
|
||||
peerplays_sidechain::sidechain_type sidechain;
|
||||
std::string peerplays_uid;
|
||||
std::string peerplays_transaction_id;
|
||||
chain::account_id_type peerplays_from;
|
||||
chain::asset peerplays_asset;
|
||||
sidechain_type withdraw_sidechain;
|
||||
peerplays_sidechain::sidechain_type withdraw_sidechain;
|
||||
std::string withdraw_address;
|
||||
std::string withdraw_currency;
|
||||
safe<int64_t> withdraw_amount;
|
||||
|
|
@ -47,14 +47,14 @@ namespace graphene { namespace chain {
|
|||
member<son_wallet_withdraw_object, std::string, &son_wallet_withdraw_object::peerplays_uid>
|
||||
>,
|
||||
ordered_non_unique< tag<by_withdraw_sidechain>,
|
||||
member<son_wallet_withdraw_object, sidechain_type, &son_wallet_withdraw_object::withdraw_sidechain>
|
||||
member<son_wallet_withdraw_object, peerplays_sidechain::sidechain_type, &son_wallet_withdraw_object::withdraw_sidechain>
|
||||
>,
|
||||
ordered_non_unique< tag<by_processed>,
|
||||
member<son_wallet_withdraw_object, bool, &son_wallet_withdraw_object::processed>
|
||||
>,
|
||||
ordered_non_unique< tag<by_withdraw_sidechain_and_processed>,
|
||||
composite_key<son_wallet_withdraw_object,
|
||||
member<son_wallet_withdraw_object, sidechain_type, &son_wallet_withdraw_object::withdraw_sidechain>,
|
||||
member<son_wallet_withdraw_object, peerplays_sidechain::sidechain_type, &son_wallet_withdraw_object::withdraw_sidechain>,
|
||||
member<son_wallet_withdraw_object, bool, &son_wallet_withdraw_object::processed>
|
||||
>
|
||||
>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ struct info_for_vin {
|
|||
|
||||
struct sidechain_event_data {
|
||||
fc::time_point_sec timestamp;
|
||||
chain::sidechain_type sidechain;
|
||||
sidechain_type sidechain;
|
||||
std::string sidechain_uid;
|
||||
std::string sidechain_transaction_id;
|
||||
std::string sidechain_from;
|
||||
|
|
|
|||
|
|
@ -1320,7 +1320,7 @@ class wallet_api
|
|||
string url,
|
||||
vesting_balance_id_type deposit_id,
|
||||
vesting_balance_id_type pay_vb_id,
|
||||
flat_map<sidechain_type, string> sidechain_public_keys,
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||
bool broadcast = false);
|
||||
|
||||
/**
|
||||
|
|
@ -1335,7 +1335,7 @@ class wallet_api
|
|||
signed_transaction update_son(string owner_account,
|
||||
string url,
|
||||
string block_signing_key,
|
||||
flat_map<sidechain_type, string> sidechain_public_keys,
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||
bool broadcast = false);
|
||||
|
||||
|
||||
|
|
@ -1422,7 +1422,7 @@ class wallet_api
|
|||
* @returns the signed transaction adding sidechain address
|
||||
*/
|
||||
signed_transaction add_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
string deposit_address,
|
||||
string withdraw_address,
|
||||
bool broadcast = false);
|
||||
|
|
@ -1439,7 +1439,7 @@ class wallet_api
|
|||
* @returns the signed transaction updating sidechain address
|
||||
*/
|
||||
signed_transaction update_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
string deposit_address,
|
||||
string withdraw_address,
|
||||
bool broadcast = false);
|
||||
|
|
@ -1452,7 +1452,7 @@ class wallet_api
|
|||
* @returns the signed transaction updating sidechain address
|
||||
*/
|
||||
signed_transaction delete_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
bool broadcast = false);
|
||||
|
||||
/** Retrieves all sidechain addresses owned by given account.
|
||||
|
|
@ -1467,7 +1467,7 @@ class wallet_api
|
|||
* @param sidechain the name of the sidechain
|
||||
* @returns the list of all sidechain addresses registered for a given sidechain.
|
||||
*/
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_sidechain(sidechain_type sidechain);
|
||||
vector<optional<sidechain_address_object>> get_sidechain_addresses_by_sidechain(peerplays_sidechain::sidechain_type sidechain);
|
||||
|
||||
/** Retrieves sidechain address owned by given account for a given sidechain.
|
||||
*
|
||||
|
|
@ -1475,7 +1475,7 @@ class wallet_api
|
|||
* @param sidechain the name of the sidechain
|
||||
* @returns the sidechain address owned by given account for a given sidechain.
|
||||
*/
|
||||
fc::optional<sidechain_address_object> get_sidechain_address_by_account_and_sidechain(string account, sidechain_type sidechain);
|
||||
fc::optional<sidechain_address_object> get_sidechain_address_by_account_and_sidechain(string account, peerplays_sidechain::sidechain_type sidechain);
|
||||
|
||||
/** Retrieves the total number of sidechain addresses registered in the system.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1865,7 +1865,7 @@ public:
|
|||
string url,
|
||||
vesting_balance_id_type deposit_id,
|
||||
vesting_balance_id_type pay_vb_id,
|
||||
flat_map<sidechain_type, string> sidechain_public_keys,
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||
bool broadcast /* = false */)
|
||||
{ try {
|
||||
fc::scoped_lock<fc::mutex> lock(_resync_mutex);
|
||||
|
|
@ -1899,7 +1899,7 @@ public:
|
|||
signed_transaction update_son(string owner_account,
|
||||
string url,
|
||||
string block_signing_key,
|
||||
flat_map<sidechain_type, string> sidechain_public_keys,
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||
bool broadcast /* = false */)
|
||||
{ try {
|
||||
son_object son = get_son(owner_account);
|
||||
|
|
@ -2026,7 +2026,7 @@ public:
|
|||
} FC_CAPTURE_AND_RETHROW() }
|
||||
|
||||
signed_transaction add_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
string deposit_address,
|
||||
string withdraw_address,
|
||||
bool broadcast /* = false */)
|
||||
|
|
@ -2048,7 +2048,7 @@ public:
|
|||
} FC_CAPTURE_AND_RETHROW() }
|
||||
|
||||
signed_transaction update_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
string deposit_address,
|
||||
string withdraw_address,
|
||||
bool broadcast /* = false */)
|
||||
|
|
@ -2074,7 +2074,7 @@ public:
|
|||
} FC_CAPTURE_AND_RETHROW() }
|
||||
|
||||
signed_transaction delete_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
bool broadcast /* = false */)
|
||||
{ try {
|
||||
account_id_type sidechain_address_account_id = get_account_id(account);
|
||||
|
|
@ -4444,7 +4444,7 @@ signed_transaction wallet_api::create_son(string owner_account,
|
|||
string url,
|
||||
vesting_balance_id_type deposit_id,
|
||||
vesting_balance_id_type pay_vb_id,
|
||||
flat_map<sidechain_type, string> sidechain_public_keys,
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||
bool broadcast /* = false */)
|
||||
{
|
||||
return my->create_son(owner_account, url, deposit_id, pay_vb_id, sidechain_public_keys, broadcast);
|
||||
|
|
@ -4453,7 +4453,7 @@ signed_transaction wallet_api::create_son(string owner_account,
|
|||
signed_transaction wallet_api::update_son(string owner_account,
|
||||
string url,
|
||||
string block_signing_key,
|
||||
flat_map<sidechain_type, string> sidechain_public_keys,
|
||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||
bool broadcast /* = false */)
|
||||
{
|
||||
return my->update_son(owner_account, url, block_signing_key, sidechain_public_keys, broadcast);
|
||||
|
|
@ -4501,7 +4501,7 @@ vector<optional<son_wallet_object>> wallet_api::get_son_wallets(uint32_t limit)
|
|||
}
|
||||
|
||||
signed_transaction wallet_api::add_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
string deposit_address,
|
||||
string withdraw_address,
|
||||
bool broadcast /* = false */)
|
||||
|
|
@ -4510,7 +4510,7 @@ signed_transaction wallet_api::add_sidechain_address(string account,
|
|||
}
|
||||
|
||||
signed_transaction wallet_api::update_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
string deposit_address,
|
||||
string withdraw_address,
|
||||
bool broadcast /* = false */)
|
||||
|
|
@ -4519,7 +4519,7 @@ signed_transaction wallet_api::update_sidechain_address(string account,
|
|||
}
|
||||
|
||||
signed_transaction wallet_api::delete_sidechain_address(string account,
|
||||
sidechain_type sidechain,
|
||||
peerplays_sidechain::sidechain_type sidechain,
|
||||
bool broadcast /* = false */)
|
||||
{
|
||||
return my->delete_sidechain_address(account, sidechain, broadcast);
|
||||
|
|
@ -4531,12 +4531,12 @@ vector<optional<sidechain_address_object>> wallet_api::get_sidechain_addresses_b
|
|||
return my->_remote_db->get_sidechain_addresses_by_account(account_id);
|
||||
}
|
||||
|
||||
vector<optional<sidechain_address_object>> wallet_api::get_sidechain_addresses_by_sidechain(sidechain_type sidechain)
|
||||
vector<optional<sidechain_address_object>> wallet_api::get_sidechain_addresses_by_sidechain(peerplays_sidechain::sidechain_type sidechain)
|
||||
{
|
||||
return my->_remote_db->get_sidechain_addresses_by_sidechain(sidechain);
|
||||
}
|
||||
|
||||
fc::optional<sidechain_address_object> wallet_api::get_sidechain_address_by_account_and_sidechain(string account, sidechain_type sidechain)
|
||||
fc::optional<sidechain_address_object> wallet_api::get_sidechain_address_by_account_and_sidechain(string account, peerplays_sidechain::sidechain_type sidechain)
|
||||
{
|
||||
account_id_type account_id = get_account_id(account);
|
||||
return my->_remote_db->get_sidechain_address_by_account_and_sidechain(account_id, sidechain);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
}
|
||||
|
||||
void create_son(const std::string& account_name, const std::string& son_url,
|
||||
flat_map<sidechain_type, string>& sidechain_public_keys,
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string>& sidechain_public_keys,
|
||||
bool generate_maintenance = true)
|
||||
{
|
||||
graphene::wallet::brain_key_info bki;
|
||||
|
|
@ -112,16 +112,16 @@ BOOST_AUTO_TEST_CASE( create_sons )
|
|||
BOOST_TEST_MESSAGE("SON cli wallet tests begin");
|
||||
try
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
son_test_helper sth(*this);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sth.create_son("son1account", "http://son1", sidechain_public_keys);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sth.create_son("son2account", "http://son2", sidechain_public_keys);
|
||||
|
||||
auto son1_obj = con.wallet_api_ptr->get_son("son1account");
|
||||
|
|
@ -146,10 +146,10 @@ BOOST_AUTO_TEST_CASE( cli_update_son )
|
|||
{
|
||||
BOOST_TEST_MESSAGE("Cli get_son and update_son Test");
|
||||
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
|
||||
son_test_helper sth(*this);
|
||||
sth.create_son("sonmember", "http://sonmember", sidechain_public_keys);
|
||||
|
|
@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE( cli_update_son )
|
|||
|
||||
// update SON
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
|
||||
con.wallet_api_ptr->update_son("sonmember", "http://sonmember_updated", "", sidechain_public_keys, true);
|
||||
son_data = con.wallet_api_ptr->get_son("sonmember");
|
||||
|
|
@ -187,16 +187,16 @@ BOOST_AUTO_TEST_CASE( son_voting )
|
|||
BOOST_TEST_MESSAGE("SON Vote cli wallet tests begin");
|
||||
try
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
son_test_helper sth(*this);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sth.create_son("son1account", "http://son1", sidechain_public_keys);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sth.create_son("son2account", "http://son2", sidechain_public_keys);
|
||||
|
||||
BOOST_TEST_MESSAGE("Voting for SONs");
|
||||
|
|
@ -266,16 +266,16 @@ BOOST_AUTO_TEST_CASE( delete_son )
|
|||
BOOST_TEST_MESSAGE("SON delete cli wallet tests begin");
|
||||
try
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
son_test_helper sth(*this);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sth.create_son("son1account", "http://son1", sidechain_public_keys);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sth.create_son("son2account", "http://son2", sidechain_public_keys);
|
||||
|
||||
BOOST_TEST_MESSAGE("Deleting SONs");
|
||||
|
|
@ -314,13 +314,13 @@ BOOST_FIXTURE_TEST_CASE( select_top_fifteen_sons, cli_fixture )
|
|||
gpo = con.wallet_api_ptr->get_global_properties();
|
||||
unsigned int son_number = gpo.parameters.maximum_son_count;
|
||||
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
// create son accounts
|
||||
for(unsigned int i = 0; i < son_number + 1; i++)
|
||||
{
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address " + fc::to_pretty_string(i);
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address " + fc::to_pretty_string(i);
|
||||
sth.create_son("sonaccount" + fc::to_pretty_string(i),
|
||||
"http://son" + fc::to_pretty_string(i),
|
||||
sidechain_public_keys,
|
||||
|
|
@ -385,16 +385,16 @@ BOOST_AUTO_TEST_CASE( list_son )
|
|||
BOOST_TEST_MESSAGE("List SONs cli wallet tests begin");
|
||||
try
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
son_test_helper sth(*this);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sth.create_son("son1account", "http://son1", sidechain_public_keys);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sth.create_son("son2account", "http://son2", sidechain_public_keys);
|
||||
|
||||
auto res = con.wallet_api_ptr->list_sons("", 100);
|
||||
|
|
@ -415,16 +415,16 @@ BOOST_AUTO_TEST_CASE( update_son_votes_test )
|
|||
BOOST_TEST_MESSAGE("SON update_son_votes cli wallet tests begin");
|
||||
try
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
son_test_helper sth(*this);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sth.create_son("son1account", "http://son1", sidechain_public_keys);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sth.create_son("son2account", "http://son2", sidechain_public_keys);
|
||||
|
||||
BOOST_TEST_MESSAGE("Vote for 2 accounts with update_son_votes");
|
||||
|
|
@ -572,16 +572,16 @@ BOOST_AUTO_TEST_CASE( related_functions )
|
|||
global_property_object gpo = con.wallet_api_ptr->get_global_properties();
|
||||
BOOST_CHECK(gpo.active_sons.size() == 0);
|
||||
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
son_test_helper sth(*this);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 1";
|
||||
sth.create_son("son1account", "http://son1", sidechain_public_keys);
|
||||
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address 2";
|
||||
sth.create_son("son2account", "http://son2", sidechain_public_keys);
|
||||
|
||||
gpo = con.wallet_api_ptr->get_global_properties();
|
||||
|
|
@ -608,13 +608,13 @@ BOOST_FIXTURE_TEST_CASE( cli_list_active_sons, cli_fixture )
|
|||
gpo = con.wallet_api_ptr->get_global_properties();
|
||||
unsigned int son_number = gpo.parameters.maximum_son_count;
|
||||
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
// create son accounts
|
||||
for(unsigned int i = 0; i < son_number + 1; i++)
|
||||
{
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address " + fc::to_pretty_string(i);
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address " + fc::to_pretty_string(i);
|
||||
sth.create_son("sonaccount" + fc::to_pretty_string(i),
|
||||
"http://son" + fc::to_pretty_string(i),
|
||||
sidechain_public_keys,
|
||||
|
|
@ -674,13 +674,13 @@ BOOST_AUTO_TEST_CASE( maintenance_test )
|
|||
gpo = con.wallet_api_ptr->get_global_properties();
|
||||
unsigned int son_number = gpo.parameters.maximum_son_count;
|
||||
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
|
||||
// create son accounts
|
||||
for(unsigned int i = 0; i < son_number + 1; i++)
|
||||
{
|
||||
sidechain_public_keys.clear();
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin_address " + fc::to_pretty_string(i);
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin_address " + fc::to_pretty_string(i);
|
||||
sth.create_son("sonaccount" + fc::to_pretty_string(i),
|
||||
"http://son" + fc::to_pretty_string(i),
|
||||
sidechain_public_keys,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ BOOST_AUTO_TEST_CASE( sidechain_address_add_test ) {
|
|||
sidechain_address_add_operation op;
|
||||
|
||||
op.sidechain_address_account = alice_id;
|
||||
op.sidechain = sidechain_type::bitcoin;
|
||||
op.sidechain = graphene::peerplays_sidechain::sidechain_type::bitcoin;
|
||||
op.deposit_address = "deposit_address";
|
||||
op.withdraw_address = "withdraw_address";
|
||||
|
||||
|
|
@ -43,10 +43,10 @@ BOOST_AUTO_TEST_CASE( sidechain_address_add_test ) {
|
|||
|
||||
const auto& idx = db.get_index_type<sidechain_address_index>().indices().get<by_account_and_sidechain>();
|
||||
BOOST_REQUIRE( idx.size() == 1 );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, sidechain_type::bitcoin ) );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, graphene::peerplays_sidechain::sidechain_type::bitcoin ) );
|
||||
BOOST_REQUIRE( obj != idx.end() );
|
||||
BOOST_CHECK( obj->sidechain_address_account == alice_id );
|
||||
BOOST_CHECK( obj->sidechain == sidechain_type::bitcoin );
|
||||
BOOST_CHECK( obj->sidechain == graphene::peerplays_sidechain::sidechain_type::bitcoin );
|
||||
BOOST_CHECK( obj->deposit_address == "deposit_address" );
|
||||
BOOST_CHECK( obj->withdraw_address == "withdraw_address" );
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE( sidechain_address_update_test ) {
|
|||
|
||||
const auto& idx = db.get_index_type<sidechain_address_index>().indices().get<by_account_and_sidechain>();
|
||||
BOOST_REQUIRE( idx.size() == 1 );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, sidechain_type::bitcoin ) );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, graphene::peerplays_sidechain::sidechain_type::bitcoin ) );
|
||||
BOOST_REQUIRE( obj != idx.end() );
|
||||
|
||||
std::string new_deposit_address = "new_deposit_address";
|
||||
|
|
@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE( sidechain_address_update_test ) {
|
|||
|
||||
const auto& idx = db.get_index_type<sidechain_address_index>().indices().get<by_account_and_sidechain>();
|
||||
BOOST_REQUIRE( idx.size() == 1 );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, sidechain_type::bitcoin ) );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, graphene::peerplays_sidechain::sidechain_type::bitcoin ) );
|
||||
BOOST_REQUIRE( obj != idx.end() );
|
||||
BOOST_CHECK( obj->sidechain_address_account == obj->sidechain_address_account );
|
||||
BOOST_CHECK( obj->sidechain == obj->sidechain );
|
||||
|
|
@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE( sidechain_address_delete_test ) {
|
|||
|
||||
const auto& idx = db.get_index_type<sidechain_address_index>().indices().get<by_account_and_sidechain>();
|
||||
BOOST_REQUIRE( idx.size() == 1 );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, sidechain_type::bitcoin ) );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, graphene::peerplays_sidechain::sidechain_type::bitcoin ) );
|
||||
BOOST_REQUIRE( obj != idx.end() );
|
||||
|
||||
{
|
||||
|
|
@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE( sidechain_address_delete_test ) {
|
|||
|
||||
const auto& idx = db.get_index_type<sidechain_address_index>().indices().get<by_account_and_sidechain>();
|
||||
BOOST_REQUIRE( idx.size() == 0 );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, sidechain_type::bitcoin ) );
|
||||
auto obj = idx.find( boost::make_tuple( alice_id, graphene::peerplays_sidechain::sidechain_type::bitcoin ) );
|
||||
BOOST_REQUIRE( obj == idx.end() );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ BOOST_AUTO_TEST_CASE( create_son_test ) {
|
|||
|
||||
// alice became son
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin address";
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin address";
|
||||
|
||||
son_create_operation op;
|
||||
op.owner_account = alice_id;
|
||||
|
|
@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE( create_son_test ) {
|
|||
BOOST_REQUIRE( obj != idx.end() );
|
||||
BOOST_CHECK( obj->url == test_url );
|
||||
BOOST_CHECK( obj->signing_key == alice_public_key );
|
||||
BOOST_CHECK( obj->sidechain_public_keys.at(sidechain_type::bitcoin) == "bitcoin address" );
|
||||
BOOST_CHECK( obj->sidechain_public_keys.at(graphene::peerplays_sidechain::sidechain_type::bitcoin) == "bitcoin address" );
|
||||
BOOST_CHECK( obj->deposit.instance == deposit.instance.value );
|
||||
BOOST_CHECK( obj->pay_vb.instance == payment.instance.value );
|
||||
}
|
||||
|
|
@ -118,8 +118,8 @@ BOOST_AUTO_TEST_CASE( update_son_test ) {
|
|||
std::string new_url = "https://anewurl.com";
|
||||
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "new bitcoin address";
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "new bitcoin address";
|
||||
|
||||
son_update_operation op;
|
||||
op.son_id = son_id_type(0);
|
||||
|
|
@ -138,7 +138,7 @@ BOOST_AUTO_TEST_CASE( update_son_test ) {
|
|||
auto obj = idx.find( alice_id );
|
||||
BOOST_REQUIRE( obj != idx.end() );
|
||||
BOOST_CHECK( obj->url == new_url );
|
||||
BOOST_CHECK( obj->sidechain_public_keys.at(sidechain_type::bitcoin) == "new bitcoin address" );
|
||||
BOOST_CHECK( obj->sidechain_public_keys.at(graphene::peerplays_sidechain::sidechain_type::bitcoin) == "new bitcoin address" );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( delete_son_test ) {
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ BOOST_AUTO_TEST_CASE( son_wallet_recreate_test ) {
|
|||
|
||||
// alice becomes son
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin address";
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin address";
|
||||
|
||||
son_create_operation op;
|
||||
op.owner_account = alice_id;
|
||||
|
|
@ -126,8 +126,8 @@ BOOST_AUTO_TEST_CASE( son_wallet_recreate_test ) {
|
|||
|
||||
// bob becomes son
|
||||
{
|
||||
flat_map<sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[sidechain_type::bitcoin] = "bitcoin address";
|
||||
flat_map<graphene::peerplays_sidechain::sidechain_type, string> sidechain_public_keys;
|
||||
sidechain_public_keys[graphene::peerplays_sidechain::sidechain_type::bitcoin] = "bitcoin address";
|
||||
|
||||
son_create_operation op;
|
||||
op.owner_account = bob_id;
|
||||
|
|
@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE( son_wallet_recreate_test ) {
|
|||
si.son_id = son_id_type(0);
|
||||
si.total_votes = 1000;
|
||||
si.signing_key = alice_public_key;
|
||||
si.sidechain_public_keys[sidechain_type::bitcoin] = "";
|
||||
si.sidechain_public_keys[peerplays_sidechain::sidechain_type::bitcoin] = "";
|
||||
op.sons.push_back(si);
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ BOOST_AUTO_TEST_CASE( son_wallet_recreate_test ) {
|
|||
si.son_id = son_id_type(1);
|
||||
si.total_votes = 1000;
|
||||
si.signing_key = bob_public_key;
|
||||
si.sidechain_public_keys[sidechain_type::bitcoin] = "";
|
||||
si.sidechain_public_keys[peerplays_sidechain::sidechain_type::bitcoin] = "";
|
||||
op.sons.push_back(si);
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE( son_wallet_update_test ) {
|
|||
|
||||
op.payer = GRAPHENE_SON_ACCOUNT;
|
||||
op.son_wallet_id = son_wallet_id_type(0);
|
||||
op.sidechain = sidechain_type::bitcoin;
|
||||
op.sidechain = graphene::peerplays_sidechain::sidechain_type::bitcoin;
|
||||
op.address = "bitcoin address";
|
||||
|
||||
trx.operations.push_back(op);
|
||||
|
|
@ -217,7 +217,7 @@ BOOST_AUTO_TEST_CASE( son_wallet_update_test ) {
|
|||
BOOST_REQUIRE( idx.size() == 1 );
|
||||
auto obj = idx.find(son_wallet_id_type(0));
|
||||
BOOST_REQUIRE( obj != idx.end() );
|
||||
BOOST_REQUIRE( obj->addresses.at(sidechain_type::bitcoin) == "bitcoin address" );
|
||||
BOOST_REQUIRE( obj->addresses.at(graphene::peerplays_sidechain::sidechain_type::bitcoin) == "bitcoin address" );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue