Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.h
// Copyright (c) 2018 The Bitcoin Core developers | // Copyright (c) 2018 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_INTERFACES_CHAIN_H | #ifndef BITCOIN_INTERFACES_CHAIN_H | ||||
#define BITCOIN_INTERFACES_CHAIN_H | #define BITCOIN_INTERFACES_CHAIN_H | ||||
#include <optional.h> | #include <optional.h> | ||||
#include <primitives/transaction.h> | |||||
#include <primitives/txid.h> | #include <primitives/txid.h> | ||||
#include <cstddef> | #include <cstddef> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <memory> | #include <memory> | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | public: | ||||
//! Check if transaction has descendants in mempool. | //! Check if transaction has descendants in mempool. | ||||
virtual bool hasDescendantsInMempool(const TxId &txid) = 0; | virtual bool hasDescendantsInMempool(const TxId &txid) = 0; | ||||
//! Calculate mempool ancestor and descendant counts for the given | //! Calculate mempool ancestor and descendant counts for the given | ||||
//! transaction. | //! transaction. | ||||
virtual void getTransactionAncestry(const TxId &txid, size_t &ancestors, | virtual void getTransactionAncestry(const TxId &txid, size_t &ancestors, | ||||
size_t &descendants) = 0; | size_t &descendants) = 0; | ||||
//! Check chain limits. | |||||
virtual bool checkChainLimits(CTransactionRef tx) = 0; | |||||
}; | }; | ||||
//! Interface to let node manage chain clients (wallets, or maybe tools for | //! Interface to let node manage chain clients (wallets, or maybe tools for | ||||
//! monitoring and analysis in the future). | //! monitoring and analysis in the future). | ||||
class ChainClient { | class ChainClient { | ||||
public: | public: | ||||
virtual ~ChainClient() {} | virtual ~ChainClient() {} | ||||
Show All 36 Lines |