ledger-core
Classes | Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
ledger::core::BitcoinLikeStrategyUtxoPicker Class Reference
+ Inheritance diagram for ledger::core::BitcoinLikeStrategyUtxoPicker:
+ Collaboration diagram for ledger::core::BitcoinLikeStrategyUtxoPicker:

Classes

struct  EffectiveUTXO
 

Public Member Functions

 BitcoinLikeStrategyUtxoPicker (const std::shared_ptr< api::ExecutionContext > &context, const api::Currency &currency)
 
- Public Member Functions inherited from ledger::core::BitcoinLikeUtxoPicker
 BitcoinLikeUtxoPicker (const std::shared_ptr< api::ExecutionContext > &context, const api::Currency &currency)
 
virtual BitcoinLikeTransactionBuildFunction getBuildFunction (const BitcoinLikeGetUtxoFunction &getUtxo, const BitcoinLikeGetTxFunction &getTransaction, const std::shared_ptr< BitcoinLikeBlockchainExplorer > &explorer, const std::shared_ptr< BitcoinLikeKeychain > &keychain, const uint64_t currentBlockHeight, const std::shared_ptr< spdlog::logger > &logger, bool partial)
 
const api::CurrencygetCurrency () const
 
- Public Member Functions inherited from ledger::core::DedicatedContext
 DedicatedContext (const std::shared_ptr< api::ExecutionContext > &context)
 
template<typename T >
Future< T > async (std::function< T()> f)
 
template<typename T >
Future< T > async (std::function< T()> f) const
 
Future< Unitrun (std::function< void()> f)
 
std::shared_ptr< api::ExecutionContextgetContext () const
 

Protected Member Functions

Future< UTXODescriptorList > filterInputs (const std::shared_ptr< Buddy > &buddy) override
 
UTXODescriptorList filterWithDeepFirst (const std::shared_ptr< Buddy > &buddy, const std::vector< std::shared_ptr< api::BitcoinLikeOutput >> &utxo, const BigInt &aggregatedAmount)
 
bool hasEnough (const std::shared_ptr< Buddy > &buddy, const BigInt &aggregatedAmount, int inputCount, bool computeOutputAmount=false)
 
Future< BigIntcomputeAggregatedAmount (const std::shared_ptr< Buddy > &buddy)
 
BitcoinLikeUtxoPicker::UTXODescriptorList filterWithOptimizeSize (const std::shared_ptr< BitcoinLikeUtxoPicker::Buddy > &buddy, const std::vector< std::shared_ptr< api::BitcoinLikeOutput >> &utxos, const BigInt &aggregatedAmount)
 
BitcoinLikeUtxoPicker::UTXODescriptorList filterWithMergeOutputs (const std::shared_ptr< BitcoinLikeUtxoPicker::Buddy > &buddy, const std::vector< std::shared_ptr< api::BitcoinLikeOutput >> &utxos, const BigInt &aggregatedAmount)
 
- Protected Member Functions inherited from ledger::core::BitcoinLikeUtxoPicker
virtual Future< UnitfillInputs (const std::shared_ptr< Buddy > &buddy)
 
virtual Future< UnitfillOutputs (const std::shared_ptr< Buddy > &buddy)
 
virtual Future< UnitfillTransactionInfo (const std::shared_ptr< Buddy > &buddy)
 

Static Protected Attributes

static const int64_t DEFAULT_FALLBACK_FEE = 20
 
static const int64_t DEFAULT_DISCARD_FEE = 10
 
static const int64_t COIN = 100000000
 
static const int64_t MAX_MONEY = 21000000 * COIN
 
static const uint32_t TOTAL_TRIES = 100000
 
static const int64_t CENT = 1000000
 
static const int64_t MIN_CHANGE = 100000
 

Additional Inherited Members

- Protected Types inherited from ledger::core::BitcoinLikeUtxoPicker
using UTXODescriptor = std::tuple< std::string, int32_t, uint32_t >
 
using UTXODescriptorList = std::vector< UTXODescriptor >
 
- Protected Attributes inherited from ledger::core::DedicatedContext
std::shared_ptr< api::ExecutionContext_executionContext
 

The documentation for this class was generated from the following files: