Return an error if attempting to use z_shieldcoinbase for Orchard shielding.

This commit is contained in:
Kris Nuttycombe 2022-05-12 18:30:53 -06:00
parent 9e360f0d9d
commit 0e1e4cbed7
1 changed files with 6 additions and 1 deletions

View File

@ -5527,7 +5527,12 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp)
}
},
[&](const libzcash::UnifiedAddress& ua) {
// OK
if (!ua.GetSaplingReceiver().has_value()) {
throw JSONRPCError(
RPC_VERIFY_REJECTED,
"Only Sapling shielding is currently supported by z_shieldcoinbase. "
"Use z_sendmany with a transaction amount that results in no change for Orchard shielding.");
}
}
}, destaddress.value());
} else {