aboutsummaryrefslogtreecommitdiff
path: root/src/qt/addresstablemodel.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-11-21 10:17:39 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2017-11-21 10:17:39 +0100
commitd6f3a737361d8fb562f08763f613a6529b870d1e (patch)
treea66d7b301bbd9f6e84a4ae89089f138bfd319f23 /src/qt/addresstablemodel.cpp
parent5197100704b87ee41c1605c0bd9ad89a2ef50c5e (diff)
downloadbitcoin-d6f3a737361d8fb562f08763f613a6529b870d1e.tar.xz
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.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp
index 1d16940acb..ca71590c12 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;
}