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
|
// Add entry
|
||||||
{
|
wallet->SetAddressBook(DecodeDestination(strAddress), strLabel,
|
||||||
LOCK(wallet->cs_wallet);
|
(type == Send ? "send" : "receive"));
|
||||||
wallet->SetAddressBook(DecodeDestination(strAddress), strLabel,
|
|
||||||
(type == Send ? "send" : "receive"));
|
|
||||||
}
|
|
||||||
return QString::fromStdString(strAddress);
|
return QString::fromStdString(strAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,10 +407,7 @@ bool AddressTableModel::removeRows(int row, int count, const QModelIndex &parent
|
||||||
// Also refuse to remove receiving addresses.
|
// Also refuse to remove receiving addresses.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
{
|
wallet->DelAddressBook(DecodeDestination(rec->address.toStdString()));
|
||||||
LOCK(wallet->cs_wallet);
|
|
||||||
wallet->DelAddressBook(DecodeDestination(rec->address.toStdString()));
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue