Merge branch 'feature/SONs-base' into feature/SON-98

This commit is contained in:
Srdjan Obucina 2020-01-23 13:16:45 +01:00
commit a6e14af38f

View file

@ -2050,8 +2050,12 @@ public:
bool broadcast /* = false */)
{ try {
account_id_type sidechain_address_account_id = get_account_id(account);
fc::optional<sidechain_address_object> sao = _remote_db->get_sidechain_address_by_account_and_sidechain(sidechain_address_account_id, sidechain);
if (!sao)
FC_THROW("No sidechain address for account ${account} and sidechain ${sidechain}", ("account", sidechain_address_account_id)("sidechain", sidechain));
sidechain_address_update_operation op;
op.sidechain_address_id = sao->id;
op.sidechain_address_account = sidechain_address_account_id;
op.sidechain = sidechain;
op.address = address;
@ -2071,8 +2075,12 @@ public:
bool broadcast /* = false */)
{ try {
account_id_type sidechain_address_account_id = get_account_id(account);
fc::optional<sidechain_address_object> sao = _remote_db->get_sidechain_address_by_account_and_sidechain(sidechain_address_account_id, sidechain);
if (!sao)
FC_THROW("No sidechain address for account ${account} and sidechain ${sidechain}", ("account", sidechain_address_account_id)("sidechain", sidechain));
sidechain_address_delete_operation op;
op.sidechain_address_id = sao->id;
op.sidechain_address_account = sidechain_address_account_id;
op.sidechain = sidechain;