main: add amount and address to spentindex value

This commit is contained in:
Braydon Fuller
2016-05-13 11:43:01 -04:00
parent 87dfd13694
commit 16d35eb228
2 changed files with 38 additions and 29 deletions

View File

@@ -325,6 +325,9 @@ struct CSpentIndexValue {
uint256 txid;
unsigned int inputIndex;
int blockHeight;
CAmount satoshis;
int addressType;
uint160 addressHash;
ADD_SERIALIZE_METHODS;
@@ -333,12 +336,18 @@ struct CSpentIndexValue {
READWRITE(txid);
READWRITE(inputIndex);
READWRITE(blockHeight);
READWRITE(satoshis);
READWRITE(addressType);
READWRITE(addressHash);
}
CSpentIndexValue(uint256 t, unsigned int i, int h) {
CSpentIndexValue(uint256 t, unsigned int i, int h, CAmount s, int type, uint160 a) {
txid = t;
inputIndex = i;
blockHeight = h;
satoshis = s;
addressType = type;
addressHash = a;
}
CSpentIndexValue() {
@@ -349,6 +358,9 @@ struct CSpentIndexValue {
txid.SetNull();
inputIndex = 0;
blockHeight = 0;
satoshis = 0;
addressType = 0;
addressHash.SetNull();
}
bool IsNull() const {