From a443d7a0ca333b0bae63e04b5d476f9ad9c7aeac Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Thu, 19 Jul 2018 11:40:13 +0900 Subject: [PATCH] moveonly: CoinElegibilityFilter into coinselection.h --- src/wallet/coinselection.h | 11 +++++++++++ src/wallet/wallet.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h index 2b185879c..64111f393 100644 --- a/src/wallet/coinselection.h +++ b/src/wallet/coinselection.h @@ -47,6 +47,17 @@ public: } }; +struct CoinEligibilityFilter +{ + const int conf_mine; + const int conf_theirs; + const uint64_t max_ancestors; + const uint64_t max_descendants; + + CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_ancestors) {} + CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors, uint64_t max_descendants) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_descendants) {} +}; + bool SelectCoinsBnB(std::vector& utxo_pool, const CAmount& target_value, const CAmount& cost_of_change, std::set& out_set, CAmount& value_ret, CAmount not_input_fees); // Original coin selection algorithm as a fallback diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 85d7209a1..173ebec53 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -652,17 +652,6 @@ struct CoinSelectionParams CoinSelectionParams() {} }; -struct CoinEligibilityFilter -{ - const int conf_mine; - const int conf_theirs; - const uint64_t max_ancestors; - const uint64_t max_descendants; - - CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_ancestors) {} - CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors, uint64_t max_descendants) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_descendants) {} -}; - class WalletRescanReserver; //forward declarations for ScanForWalletTransactions/RescanFromTime /** * A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,