Log outpoint for failed Sapling witness lookup.

This commit is contained in:
Kris Nuttycombe 2022-03-02 16:00:15 -07:00
parent 5141c2971c
commit 681505e9d6
1 changed files with 6 additions and 1 deletions

View File

@ -386,7 +386,12 @@ uint256 AsyncRPCOperation_sendmany::main_impl() {
// Add Sapling spends
for (size_t i = 0; i < saplingNotes.size(); i++) {
if (!witnesses[i]) {
throw JSONRPCError(RPC_WALLET_ERROR, "Missing witness for Sapling note");
throw JSONRPCError(
RPC_WALLET_ERROR,
strprintf(
"Missing witness for Sapling note at outpoint %s",
spendable.saplingNoteEntries[i].op.ToString())
);
}
builder_.AddSaplingSpend(saplingKeys[i].expsk, saplingNotes[i], anchor, witnesses[i].value());