Create class hierarchy for SproutNotePlaintext.

BaseNotePlaintext contains member variable for common attribute, value.
This commit is contained in:
Simon
2018-04-26 14:05:36 -07:00
parent 5020a93631
commit d266f40393
7 changed files with 41 additions and 16 deletions

View File

@@ -42,14 +42,14 @@ SproutNotePlaintext::SproutNotePlaintext(
const SproutNote& note,
boost::array<unsigned char, ZC_MEMO_SIZE> memo) : memo(memo)
{
value = note.value();
value_ = note.value();
rho = note.rho;
r = note.r;
}
SproutNote SproutNotePlaintext::note(const PaymentAddress& addr) const
{
return SproutNote(addr.a_pk, value, rho, r);
return SproutNote(addr.a_pk, value_, rho, r);
}
SproutNotePlaintext SproutNotePlaintext::decrypt(const ZCNoteDecryption& decryptor,