Move memo member varible from SproutNotePlaintext to BaseNotePlaintext.
Add memo() accessor to BaseNotePlaintext.
This commit is contained in:
@@ -885,7 +885,7 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() {
|
||||
|
||||
for (CSproutNotePlaintextEntry & 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());
|
||||
std::string data(entry.plaintext.memo().begin(), entry.plaintext.memo().end());
|
||||
LogPrint("zrpcunsafe", "%s: found unspent note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, memo=%s)\n",
|
||||
getId(),
|
||||
entry.jsop.hash.ToString().substr(0, 10),
|
||||
|
||||
@@ -277,7 +277,7 @@ UniValue z_validatepaymentdisclosure(const UniValue& params, bool fHelp)
|
||||
SproutNotePlaintext npt;
|
||||
ssPlain >> npt;
|
||||
|
||||
string memoHexString = HexStr(npt.memo.data(), npt.memo.data() + npt.memo.size());
|
||||
string memoHexString = HexStr(npt.memo().data(), npt.memo().data() + npt.memo().size());
|
||||
o.push_back(Pair("memo", memoHexString));
|
||||
o.push_back(Pair("value", ValueFromAmount(npt.value())));
|
||||
|
||||
|
||||
@@ -2550,7 +2550,7 @@ UniValue z_listunspent(const UniValue& params, bool fHelp)
|
||||
obj.push_back(Pair("spendable", pwalletMain->HaveSpendingKey(entry.address)));
|
||||
obj.push_back(Pair("address", CZCPaymentAddress(entry.address).ToString()));
|
||||
obj.push_back(Pair("amount", ValueFromAmount(CAmount(entry.plaintext.value()))));
|
||||
std::string data(entry.plaintext.memo.begin(), entry.plaintext.memo.end());
|
||||
std::string data(entry.plaintext.memo().begin(), entry.plaintext.memo().end());
|
||||
obj.push_back(Pair("memo", HexStr(data)));
|
||||
results.push_back(obj);
|
||||
}
|
||||
@@ -3241,7 +3241,7 @@ UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp)
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
obj.push_back(Pair("txid",entry.jsop.hash.ToString()));
|
||||
obj.push_back(Pair("amount", ValueFromAmount(CAmount(entry.plaintext.value()))));
|
||||
std::string data(entry.plaintext.memo.begin(), entry.plaintext.memo.end());
|
||||
std::string data(entry.plaintext.memo().begin(), entry.plaintext.memo().end());
|
||||
obj.push_back(Pair("memo", HexStr(data)));
|
||||
// (txid, jsindex, jsoutindex) is needed to globally identify a note
|
||||
obj.push_back(Pair("jsindex", entry.jsop.js));
|
||||
|
||||
Reference in New Issue
Block a user