|
|
@ -107,7 +107,9 @@ enum OutputType : int |
|
|
|
OUTPUT_TYPE_P2SH_SEGWIT, |
|
|
|
OUTPUT_TYPE_P2SH_SEGWIT, |
|
|
|
OUTPUT_TYPE_BECH32, |
|
|
|
OUTPUT_TYPE_BECH32, |
|
|
|
|
|
|
|
|
|
|
|
OUTPUT_TYPE_DEFAULT = OUTPUT_TYPE_P2SH_SEGWIT |
|
|
|
//OUTPUT_TYPE_DEFAULT = OUTPUT_TYPE_P2SH_SEGWIT
|
|
|
|
|
|
|
|
// JWU TODO FIXME: Update once we have segwit on Kevacoin.
|
|
|
|
|
|
|
|
OUTPUT_TYPE_DEFAULT = OUTPUT_TYPE_LEGACY |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
extern OutputType g_address_type; |
|
|
|
extern OutputType g_address_type; |
|
|
@ -341,10 +343,12 @@ public: |
|
|
|
mutable bool fChangeCached; |
|
|
|
mutable bool fChangeCached; |
|
|
|
mutable bool fInMempool; |
|
|
|
mutable bool fInMempool; |
|
|
|
mutable CAmount nDebitCached; |
|
|
|
mutable CAmount nDebitCached; |
|
|
|
|
|
|
|
mutable CAmount nDebitWithKevaCached; |
|
|
|
mutable CAmount nCreditCached; |
|
|
|
mutable CAmount nCreditCached; |
|
|
|
mutable CAmount nImmatureCreditCached; |
|
|
|
mutable CAmount nImmatureCreditCached; |
|
|
|
mutable CAmount nAvailableCreditCached; |
|
|
|
mutable CAmount nAvailableCreditCached; |
|
|
|
mutable CAmount nWatchDebitCached; |
|
|
|
mutable CAmount nWatchDebitCached; |
|
|
|
|
|
|
|
mutable CAmount nWatchDebitWithKevaCached; |
|
|
|
mutable CAmount nWatchCreditCached; |
|
|
|
mutable CAmount nWatchCreditCached; |
|
|
|
mutable CAmount nImmatureWatchCreditCached; |
|
|
|
mutable CAmount nImmatureWatchCreditCached; |
|
|
|
mutable CAmount nAvailableWatchCreditCached; |
|
|
|
mutable CAmount nAvailableWatchCreditCached; |
|
|
@ -381,10 +385,12 @@ public: |
|
|
|
fChangeCached = false; |
|
|
|
fChangeCached = false; |
|
|
|
fInMempool = false; |
|
|
|
fInMempool = false; |
|
|
|
nDebitCached = 0; |
|
|
|
nDebitCached = 0; |
|
|
|
|
|
|
|
nDebitWithKevaCached = 0; |
|
|
|
nCreditCached = 0; |
|
|
|
nCreditCached = 0; |
|
|
|
nImmatureCreditCached = 0; |
|
|
|
nImmatureCreditCached = 0; |
|
|
|
nAvailableCreditCached = 0; |
|
|
|
nAvailableCreditCached = 0; |
|
|
|
nWatchDebitCached = 0; |
|
|
|
nWatchDebitCached = 0; |
|
|
|
|
|
|
|
nWatchDebitWithKevaCached = 0; |
|
|
|
nWatchCreditCached = 0; |
|
|
|
nWatchCreditCached = 0; |
|
|
|
nAvailableWatchCreditCached = 0; |
|
|
|
nAvailableWatchCreditCached = 0; |
|
|
|
nImmatureWatchCreditCached = 0; |
|
|
|
nImmatureWatchCreditCached = 0; |
|
|
@ -456,7 +462,7 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//! filter decides which addresses will count towards the debit
|
|
|
|
//! filter decides which addresses will count towards the debit
|
|
|
|
CAmount GetDebit(const isminefilter& filter) const; |
|
|
|
CAmount GetDebit(const isminefilter& filter, bool fExcludeKeva = true) const; |
|
|
|
CAmount GetCredit(const isminefilter& filter) const; |
|
|
|
CAmount GetCredit(const isminefilter& filter) const; |
|
|
|
CAmount GetImmatureCredit(bool fUseCache=true) const; |
|
|
|
CAmount GetImmatureCredit(bool fUseCache=true) const; |
|
|
|
CAmount GetAvailableCredit(bool fUseCache=true) const; |
|
|
|
CAmount GetAvailableCredit(bool fUseCache=true) const; |
|
|
@ -1027,7 +1033,7 @@ public: |
|
|
|
* Returns amount of debit if the input matches the |
|
|
|
* Returns amount of debit if the input matches the |
|
|
|
* filter, otherwise returns 0 |
|
|
|
* filter, otherwise returns 0 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
CAmount GetDebit(const CTxIn& txin, const isminefilter& filter) const; |
|
|
|
CAmount GetDebit(const CTxIn& txin, const isminefilter& filter, bool fExcludeKeva = true) const; |
|
|
|
isminetype IsMine(const CTxOut& txout) const; |
|
|
|
isminetype IsMine(const CTxOut& txout) const; |
|
|
|
CAmount GetCredit(const CTxOut& txout, const isminefilter& filter) const; |
|
|
|
CAmount GetCredit(const CTxOut& txout, const isminefilter& filter) const; |
|
|
|
bool IsChange(const CTxOut& txout) const; |
|
|
|
bool IsChange(const CTxOut& txout) const; |
|
|
@ -1035,7 +1041,7 @@ public: |
|
|
|
bool IsMine(const CTransaction& tx) const; |
|
|
|
bool IsMine(const CTransaction& tx) const; |
|
|
|
/** should probably be renamed to IsRelevantToMe */ |
|
|
|
/** should probably be renamed to IsRelevantToMe */ |
|
|
|
bool IsFromMe(const CTransaction& tx) const; |
|
|
|
bool IsFromMe(const CTransaction& tx) const; |
|
|
|
CAmount GetDebit(const CTransaction& tx, const isminefilter& filter) const; |
|
|
|
CAmount GetDebit(const CTransaction& tx, const isminefilter& filter, bool fExcludeKeva = true) const; |
|
|
|
/** Returns whether all of the inputs match the filter */ |
|
|
|
/** Returns whether all of the inputs match the filter */ |
|
|
|
bool IsAllFromMe(const CTransaction& tx, const isminefilter& filter) const; |
|
|
|
bool IsAllFromMe(const CTransaction& tx, const isminefilter& filter) const; |
|
|
|
CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const; |
|
|
|
CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const; |
|
|
|