Return failure rather than asserting on WriteRecipientMapping failure.
Addresses https://github.com/zcash/zcash/pull/5700#discussion_r830538438
This commit is contained in:
parent
9220ebb0de
commit
758852b281
|
@ -1715,11 +1715,14 @@ public:
|
|||
{
|
||||
sendRecipients[txid].push_back(recipient);
|
||||
if (recipient.ua.has_value()) {
|
||||
assert(CWalletDB(strWalletFile).WriteRecipientMapping(
|
||||
if (!CWalletDB(strWalletFile).WriteRecipientMapping(
|
||||
txid,
|
||||
recipient.address,
|
||||
recipient.ua.value()
|
||||
));
|
||||
)) {
|
||||
LogPrintf("SaveRecipientMappings: Failed to write recipient mappings to the wallet database.");
|
||||
return false;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue