Add debug option "zrpcunsafe" to be used when logging more sensitive information such as the memo field of a note.
This commit is contained in:
parent
e7b1f312f5
commit
446f867b4c
|
@ -780,7 +780,8 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() {
|
|||
for (CNotePlaintextEntry & entry : entries) {
|
||||
z_inputs_.push_back(SendManyInputJSOP(entry.jsop, entry.plaintext.note(frompaymentaddress_), CAmount(entry.plaintext.value)));
|
||||
std::string data(entry.plaintext.memo.begin(), entry.plaintext.memo.end());
|
||||
LogPrint("zrpc", "%s: found unspent note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, memo=%s)\n",
|
||||
if (LogAcceptCategory("zrpcunsafe")) {
|
||||
LogPrint("zrpcunsafe", "%s: found unspent note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, memo=%s)\n",
|
||||
getId().substr(0, 10),
|
||||
entry.jsop.hash.ToString().substr(0, 10),
|
||||
entry.jsop.js,
|
||||
|
@ -788,6 +789,15 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() {
|
|||
FormatMoney(entry.plaintext.value, false),
|
||||
HexStr(data).substr(0, 10)
|
||||
);
|
||||
} else {
|
||||
LogPrint("zrpc", "%s: found unspent note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s)\n",
|
||||
getId().substr(0, 10),
|
||||
entry.jsop.hash.ToString().substr(0, 10),
|
||||
entry.jsop.js,
|
||||
int(entry.jsop.n), // uint8_t
|
||||
FormatMoney(entry.plaintext.value, false)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (z_inputs_.size() == 0) {
|
||||
|
|
Loading…
Reference in New Issue