Remove redundant locks
* SetAddressBook(...) is locking cs_wallet internally * DelAddressBook(...) is locking cs_wallet internally
This commit is contained in:
parent
5197100704
commit
d6f3a73736
1 changed files with 3 additions and 9 deletions
|
@ -392,11 +392,8 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con
|
|||
}
|
||||
|
||||
// Add entry
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
wallet->SetAddressBook(DecodeDestination(strAddress), strLabel,
|
||||
(type == Send ? "send" : "receive"));
|
||||
}
|
||||
wallet->SetAddressBook(DecodeDestination(strAddress), strLabel,
|
||||
(type == Send ? "send" : "receive"));
|
||||
return QString::fromStdString(strAddress);
|
||||
}
|
||||
|
||||
|
@ -410,10 +407,7 @@ bool AddressTableModel::removeRows(int row, int count, const QModelIndex &parent
|
|||
// Also refuse to remove receiving addresses.
|
||||
return false;
|
||||
}
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
wallet->DelAddressBook(DecodeDestination(rec->address.toStdString()));
|
||||
}
|
||||
wallet->DelAddressBook(DecodeDestination(rec->address.toStdString()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue