Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_TXMEMPOOL_H | #ifndef BITCOIN_TXMEMPOOL_H | ||||
#define BITCOIN_TXMEMPOOL_H | #define BITCOIN_TXMEMPOOL_H | ||||
#include <amount.h> | #include <amount.h> | ||||
#include <coins.h> | #include <coins.h> | ||||
#include <core_memusage.h> | #include <core_memusage.h> | ||||
#include <indirectmap.h> | #include <indirectmap.h> | ||||
#include <optional.h> | |||||
#include <primitives/transaction.h> | #include <primitives/transaction.h> | ||||
#include <salteduint256hasher.h> | #include <salteduint256hasher.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <boost/multi_index/hashed_index.hpp> | #include <boost/multi_index/hashed_index.hpp> | ||||
#include <boost/multi_index/ordered_index.hpp> | #include <boost/multi_index/ordered_index.hpp> | ||||
#include <boost/multi_index/sequenced_index.hpp> | #include <boost/multi_index/sequenced_index.hpp> | ||||
#include <boost/multi_index_container.hpp> | #include <boost/multi_index_container.hpp> | ||||
▲ Show 20 Lines • Show All 620 Lines • ▼ Show 20 Lines | public: | ||||
void ApplyDelta(const TxId &txid, Amount &nFeeDelta) const; | void ApplyDelta(const TxId &txid, Amount &nFeeDelta) const; | ||||
void ClearPrioritisation(const TxId &txid); | void ClearPrioritisation(const TxId &txid); | ||||
/** Get the transaction in the pool that spends the same prevout */ | /** Get the transaction in the pool that spends the same prevout */ | ||||
const CTransaction *GetConflictTx(const COutPoint &prevout) const | const CTransaction *GetConflictTx(const COutPoint &prevout) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs); | EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
/** Returns an iterator to the given txid, if found */ | /** Returns an iterator to the given txid, if found */ | ||||
Optional<txiter> GetIter(const TxId &txid) const | std::optional<txiter> GetIter(const TxId &txid) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs); | EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
/** | /** | ||||
* Translate a set of txids into a set of pool iterators to avoid repeated | * Translate a set of txids into a set of pool iterators to avoid repeated | ||||
* lookups. | * lookups. | ||||
*/ | */ | ||||
setEntries GetIterSet(const std::set<TxId> &txids) const | setEntries GetIterSet(const std::set<TxId> &txids) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs); | EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines |