![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include <saplingscriptpubkeyman.h>
Public Member Functions | |
| SaplingNoteData () | |
| SaplingNoteData (const libzcash::SaplingIncomingViewingKey &_ivk) | |
| SaplingNoteData (const libzcash::SaplingIncomingViewingKey &_ivk, const uint256 &n) | |
| bool | IsMyNote () const |
| SERIALIZE_METHODS (SaplingNoteData, obj) | |
Public Attributes | |
| std::list< SaplingWitness > | witnesses |
| Optional< libzcash::SaplingIncomingViewingKey > | ivk {nullopt} |
| Optional< CAmount > | amount {nullopt} |
| Cached note amount. More... | |
| Optional< libzcash::SaplingPaymentAddress > | address {nullopt} |
| Cached shielded address It will be loaded the first time that the note is decrypted (when the tx is added to the wallet) More... | |
| Optional< std::array< unsigned char, ZC_MEMO_SIZE > > | memo {nullopt} |
| Cached note memo (only for non-empty memo) It will be loaded the first time that the note is decrypted (when the tx is added to the wallet) More... | |
| int | witnessHeight {-1} |
| Block height corresponding to the most current witness. More... | |
| Optional< uint256 > | nullifier |
| Cached note nullifier. More... | |
Friends | |
| bool | operator== (const SaplingNoteData &a, const SaplingNoteData &b) |
| bool | operator!= (const SaplingNoteData &a, const SaplingNoteData &b) |
Definition at line 43 of file saplingscriptpubkeyman.h.
|
inline |
Definition at line 47 of file saplingscriptpubkeyman.h.
|
inlineexplicit |
Definition at line 48 of file saplingscriptpubkeyman.h.
|
inline |
Definition at line 49 of file saplingscriptpubkeyman.h.
|
inline |
|
inline |
Definition at line 100 of file saplingscriptpubkeyman.h.
|
friend |
Definition at line 124 of file saplingscriptpubkeyman.h.
|
friend |
Definition at line 115 of file saplingscriptpubkeyman.h.
| Optional<libzcash::SaplingPaymentAddress> SaplingNoteData::address {nullopt} |
Cached shielded address It will be loaded the first time that the note is decrypted (when the tx is added to the wallet)
Definition at line 67 of file saplingscriptpubkeyman.h.
Cached note amount.
It will be loaded the first time that the note is decrypted (when the tx is added to the wallet).
Definition at line 61 of file saplingscriptpubkeyman.h.
| Optional<libzcash::SaplingIncomingViewingKey> SaplingNoteData::ivk {nullopt} |
Definition at line 54 of file saplingscriptpubkeyman.h.
| Optional<std::array<unsigned char, ZC_MEMO_SIZE> > SaplingNoteData::memo {nullopt} |
Cached note memo (only for non-empty memo) It will be loaded the first time that the note is decrypted (when the tx is added to the wallet)
Definition at line 73 of file saplingscriptpubkeyman.h.
Cached note nullifier.
May not be set if the wallet was not unlocked when this SaplingNoteData was created. If not set, we always assume that the note has not been spent.
It's okay to cache the nullifier in the wallet, because we are storing the spending key there too, which could be used to derive this. If the wallet is encrypted, this means that someone with access to the locked wallet cannot spend notes, but can connect received notes to the transactions they are spent in. This is the same security semantics as for transparent addresses.
Definition at line 98 of file saplingscriptpubkeyman.h.
| std::list<SaplingWitness> SaplingNoteData::witnesses |
Definition at line 52 of file saplingscriptpubkeyman.h.
| int SaplingNoteData::witnessHeight {-1} |
Block height corresponding to the most current witness.
When we first create a SaplingNoteData in SaplingScriptPubKeyMan::FindMySaplingNotes, this is set to -1 as a placeholder. The next time CWallet::BlockConnected/CWallet::BlockDisconnected is called, we can determine what height the witness cache for this note is valid for (even if no witnesses were cached), and so can set the correct value in SaplingScriptPubKeyMan::IncrementNoteWitnesses and SaplingScriptPubKeyMan::DecrementNoteWitnesses.
Definition at line 84 of file saplingscriptpubkeyman.h.