diff options
| author | practicalswift <[email protected]> | 2017-11-21 10:17:39 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-11-21 10:17:39 +0100 |
| commit | d6f3a737361d8fb562f08763f613a6529b870d1e (patch) | |
| tree | a66d7b301bbd9f6e84a4ae89089f138bfd319f23 /src/qt/addresstablemodel.cpp | |
| parent | Merge #11706: Make default issue text all comments to make issues more readable (diff) | |
| download | discoin-d6f3a737361d8fb562f08763f613a6529b870d1e.tar.xz discoin-d6f3a737361d8fb562f08763f613a6529b870d1e.zip | |
Remove redundant locks
* SetAddressBook(...) is locking cs_wallet internally
* DelAddressBook(...) is locking cs_wallet internally
Diffstat (limited to 'src/qt/addresstablemodel.cpp')
| -rw-r--r-- | src/qt/addresstablemodel.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index 1d16940ac..ca71590c1 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -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; } |