X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fwallet.h;h=a9be672b330c7e26731bf3aaa1c054392a5d6041;hb=fe25370cb1bcb07a894fc1a020cbf99e8bb07434;hp=9a419351d4c99cb102ec1392e8533c28ee49527d;hpb=556ce5b71bb1cb6bf429e03b0288ac873b5ee22d;p=novacoin.git diff --git a/src/wallet.h b/src/wallet.h index 9a41935..a9be672 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -69,7 +69,7 @@ public: class CWallet : public CCryptoKeyStore { private: - bool SelectCoinsSimple(int64 nTargetValue, unsigned int nSpendTime, int nMinConf, std::set >& setCoinsRet, int64& nValueRet) const; + bool SelectCoinsSimple(int64 nTargetValue, int64 nMinValue, int64 nMaxValue, unsigned int nSpendTime, int nMinConf, std::set >& setCoinsRet, int64& nValueRet) const; bool SelectCoins(int64 nTargetValue, unsigned int nSpendTime, std::set >& setCoinsRet, int64& nValueRet, const CCoinControl *coinControl=NULL) const; CWalletDB *pwalletdbEncryption; @@ -80,6 +80,9 @@ private: // the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded int nWalletMaxVersion; + // selected coins metadata + std::map >, std::pair > > mapMeta; + public: mutable CCriticalSection cs_wallet; @@ -126,7 +129,7 @@ public: // check whether we are allowed to upgrade (or already support) to the named feature bool CanSupportFeature(enum WalletFeature wf) { return nWalletMaxVersion >= wf; } - void AvailableCoinsMinConf(std::vector& vCoins, int nConf) const; + void AvailableCoinsMinConf(std::vector& vCoins, int nConf, int64 nMinValue, int64 nMaxValue) const; void AvailableCoins(std::vector& vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL) const; bool SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, std::vector vCoins, std::set >& setCoinsRet, int64& nValueRet) const; // keystore implementation @@ -200,7 +203,7 @@ public: bool GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint64& nMaxWeight, uint64& nWeight); void GetStakeWeightFromValue(const int64& nTime, const int64& nValue, uint64& nWeight); bool CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction& txNew, CKey& key); - bool MergeCoins(const int64& nAmount, const int64& nMaxValue, const int64& nOutputValue, list& listMerged); + bool MergeCoins(const int64& nAmount, const int64& nMinValue, const int64& nMaxValue, std::list& listMerged); std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false); std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);