mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge d84f736ba1 into merged_master (Bitcoin PR bitcoin/bitcoin#29176)
This commit is contained in:
commit
8b5cee9cc0
1 changed files with 2 additions and 2 deletions
|
|
@ -1544,13 +1544,13 @@ bool WalletBatch::EraseRecords(const std::unordered_set<std::string>& types)
|
|||
}
|
||||
|
||||
// Make a copy of key to avoid data being deleted by the following read of the type
|
||||
Span key_data{key};
|
||||
const SerializeData key_data{key.begin(), key.end()};
|
||||
|
||||
std::string type;
|
||||
key >> type;
|
||||
|
||||
if (types.count(type) > 0) {
|
||||
if (!m_batch->Erase(key_data)) {
|
||||
if (!m_batch->Erase(Span{key_data})) {
|
||||
cursor.reset(nullptr);
|
||||
m_batch->TxnAbort();
|
||||
return false; // erase failed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue