Merge branch 'feature/SONs-base' into feature/SON-98
This commit is contained in:
commit
01a1f584df
1 changed files with 4 additions and 0 deletions
|
|
@ -858,6 +858,7 @@ public:
|
||||||
// account, false otherwise (but it is stored either way)
|
// account, false otherwise (but it is stored either way)
|
||||||
bool import_key(string account_name_or_id, string wif_key)
|
bool import_key(string account_name_or_id, string wif_key)
|
||||||
{
|
{
|
||||||
|
fc::scoped_lock<fc::mutex> lock(_resync_mutex);
|
||||||
fc::optional<fc::ecc::private_key> optional_private_key = wif_to_key(wif_key);
|
fc::optional<fc::ecc::private_key> optional_private_key = wif_to_key(wif_key);
|
||||||
if (!optional_private_key)
|
if (!optional_private_key)
|
||||||
FC_THROW("Invalid private key");
|
FC_THROW("Invalid private key");
|
||||||
|
|
@ -1359,6 +1360,7 @@ public:
|
||||||
bool broadcast = false,
|
bool broadcast = false,
|
||||||
bool save_wallet = true)
|
bool save_wallet = true)
|
||||||
{ try {
|
{ try {
|
||||||
|
fc::scoped_lock<fc::mutex> lock(_resync_mutex);
|
||||||
int active_key_index = find_first_unused_derived_key_index(owner_privkey);
|
int active_key_index = find_first_unused_derived_key_index(owner_privkey);
|
||||||
fc::ecc::private_key active_privkey = derive_private_key( key_to_wif(owner_privkey), active_key_index);
|
fc::ecc::private_key active_privkey = derive_private_key( key_to_wif(owner_privkey), active_key_index);
|
||||||
|
|
||||||
|
|
@ -1866,6 +1868,7 @@ public:
|
||||||
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
flat_map<peerplays_sidechain::sidechain_type, string> sidechain_public_keys,
|
||||||
bool broadcast /* = false */)
|
bool broadcast /* = false */)
|
||||||
{ try {
|
{ try {
|
||||||
|
fc::scoped_lock<fc::mutex> lock(_resync_mutex);
|
||||||
account_object son_account = get_account(owner_account);
|
account_object son_account = get_account(owner_account);
|
||||||
fc::ecc::private_key active_private_key = get_private_key_for_account(son_account);
|
fc::ecc::private_key active_private_key = get_private_key_for_account(son_account);
|
||||||
int son_key_index = find_first_unused_derived_key_index(active_private_key);
|
int son_key_index = find_first_unused_derived_key_index(active_private_key);
|
||||||
|
|
@ -2097,6 +2100,7 @@ public:
|
||||||
string url,
|
string url,
|
||||||
bool broadcast /* = false */)
|
bool broadcast /* = false */)
|
||||||
{ try {
|
{ try {
|
||||||
|
fc::scoped_lock<fc::mutex> lock(_resync_mutex);
|
||||||
account_object witness_account = get_account(owner_account);
|
account_object witness_account = get_account(owner_account);
|
||||||
fc::ecc::private_key active_private_key = get_private_key_for_account(witness_account);
|
fc::ecc::private_key active_private_key = get_private_key_for_account(witness_account);
|
||||||
int witness_key_index = find_first_unused_derived_key_index(active_private_key);
|
int witness_key_index = find_first_unused_derived_key_index(active_private_key);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue