Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.h
Show First 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | public: | ||||
//! Chain notifications. | //! Chain notifications. | ||||
class Notifications { | class Notifications { | ||||
public: | public: | ||||
virtual ~Notifications() {} | virtual ~Notifications() {} | ||||
virtual void transactionAddedToMempool(const CTransactionRef &tx) {} | virtual void transactionAddedToMempool(const CTransactionRef &tx) {} | ||||
virtual void transactionRemovedFromMempool(const CTransactionRef &ptx) { | virtual void transactionRemovedFromMempool(const CTransactionRef &ptx) { | ||||
} | } | ||||
virtual void | virtual void blockConnected(const CBlock &block, int height) {} | ||||
blockConnected(const CBlock &block, | |||||
const std::vector<CTransactionRef> &tx_conflicted, | |||||
int height) {} | |||||
virtual void blockDisconnected(const CBlock &block, int height) {} | virtual void blockDisconnected(const CBlock &block, int height) {} | ||||
virtual void updatedBlockTip() {} | virtual void updatedBlockTip() {} | ||||
virtual void chainStateFlushed(const CBlockLocator &locator) {} | virtual void chainStateFlushed(const CBlockLocator &locator) {} | ||||
}; | }; | ||||
//! Register handler for notifications. | //! Register handler for notifications. | ||||
virtual std::unique_ptr<Handler> | virtual std::unique_ptr<Handler> | ||||
handleNotifications(std::shared_ptr<Notifications> notifications) = 0; | handleNotifications(std::shared_ptr<Notifications> notifications) = 0; | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |