main: sort address index utxos by height
This commit is contained in:
committed by
Braydon Fuller
parent
d0483c9aa0
commit
1bd65a5c4b
@@ -399,6 +399,7 @@ struct CAddressUnspentKey {
|
||||
struct CAddressUnspentValue {
|
||||
CAmount satoshis;
|
||||
CScript script;
|
||||
int blockHeight;
|
||||
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
@@ -406,11 +407,13 @@ struct CAddressUnspentValue {
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(satoshis);
|
||||
READWRITE(*(CScriptBase*)(&script));
|
||||
READWRITE(blockHeight);
|
||||
}
|
||||
|
||||
CAddressUnspentValue(CAmount sats, CScript scriptPubKey) {
|
||||
CAddressUnspentValue(CAmount sats, CScript scriptPubKey, int height) {
|
||||
satoshis = sats;
|
||||
script = scriptPubKey;
|
||||
blockHeight = height;
|
||||
}
|
||||
|
||||
CAddressUnspentValue() {
|
||||
@@ -420,6 +423,7 @@ struct CAddressUnspentValue {
|
||||
void SetNull() {
|
||||
satoshis = -1;
|
||||
script.clear();
|
||||
blockHeight = 0;
|
||||
}
|
||||
|
||||
bool IsNull() const {
|
||||
|
||||
Reference in New Issue
Block a user