Add sapling note data and map

This commit is contained in:
Eirik Ogilvie-Wigley
2018-07-17 11:49:18 -06:00
committed by Simon
parent 00ed92343d
commit be43b7469d

View File

@@ -263,7 +263,15 @@ public:
} }
}; };
class SaplingNoteData
{
public:
std::list<ZCIncrementalWitness> witnesses;
int witnessHeight;
};
typedef std::map<JSOutPoint, SproutNoteData> mapSproutNoteData_t; typedef std::map<JSOutPoint, SproutNoteData> mapSproutNoteData_t;
typedef std::map<SaplingOutPoint, SaplingNoteData> mapSaplingNoteData_t;
/** Decrypted note and its location in a transaction. */ /** Decrypted note and its location in a transaction. */
struct CSproutNotePlaintextEntry struct CSproutNotePlaintextEntry
@@ -351,6 +359,7 @@ private:
public: public:
mapValue_t mapValue; mapValue_t mapValue;
mapSproutNoteData_t mapSproutNoteData; mapSproutNoteData_t mapSproutNoteData;
mapSaplingNoteData_t mapSaplingNoteData;
std::vector<std::pair<std::string, std::string> > vOrderForm; std::vector<std::pair<std::string, std::string> > vOrderForm;
unsigned int fTimeReceivedIsTxTime; unsigned int fTimeReceivedIsTxTime;
unsigned int nTimeReceived; //! time received by this node unsigned int nTimeReceived; //! time received by this node
@@ -404,6 +413,7 @@ public:
pwallet = pwalletIn; pwallet = pwalletIn;
mapValue.clear(); mapValue.clear();
mapSproutNoteData.clear(); mapSproutNoteData.clear();
mapSaplingNoteData.clear();
vOrderForm.clear(); vOrderForm.clear();
fTimeReceivedIsTxTime = false; fTimeReceivedIsTxTime = false;
nTimeReceived = 0; nTimeReceived = 0;
@@ -459,6 +469,8 @@ public:
READWRITE(nTimeReceived); READWRITE(nTimeReceived);
READWRITE(fFromMe); READWRITE(fFromMe);
READWRITE(fSpent); READWRITE(fSpent);
// TODO:
//READWRITE(mapSaplingNoteData);
if (ser_action.ForRead()) if (ser_action.ForRead())
{ {