Kagome
Polkadot Runtime Engine in C++17
kagome::transaction_pool::PoolModerator Class Referenceabstract

#include <pool_moderator.hpp>

Inheritance diagram for kagome::transaction_pool::PoolModerator:
Collaboration diagram for kagome::transaction_pool::PoolModerator:

Public Member Functions

virtual ~PoolModerator ()=default
 
virtual void ban (const common::Hash256 &tx_hash)=0
 
virtual bool banIfStale (primitives::BlockNumber current_block, const Transaction &tx)=0
 
virtual bool isBanned (const Transaction::Hash &tx_hash) const =0
 
virtual void updateBan ()=0
 
virtual size_t bannedNum () const =0
 

Detailed Description

PoolModerator is responsible for banning transaction for a fixed amount of time to prevent them from returning to the transaction pool when it is undesirable

Definition at line 21 of file pool_moderator.hpp.

Constructor & Destructor Documentation

virtual kagome::transaction_pool::PoolModerator::~PoolModerator ( )
virtualdefault

Member Function Documentation

virtual void kagome::transaction_pool::PoolModerator::ban ( const common::Hash256 tx_hash)
pure virtual

Bans a transaction for a fixed amount of time

Parameters
tx_hash

Implemented in kagome::transaction_pool::PoolModeratorImpl.

virtual bool kagome::transaction_pool::PoolModerator::banIfStale ( primitives::BlockNumber  current_block,
const Transaction &  tx 
)
pure virtual

Bans a transaction

Parameters
txif its longevity is past
current_block
Returns
true if the transaction has been banned, false otherwise

Implemented in kagome::transaction_pool::PoolModeratorImpl.

virtual size_t kagome::transaction_pool::PoolModerator::bannedNum ( ) const
pure virtual

Return the number of currently banned transactions

Implemented in kagome::transaction_pool::PoolModeratorImpl.

virtual bool kagome::transaction_pool::PoolModerator::isBanned ( const Transaction::Hash &  tx_hash) const
pure virtual
Returns
true if
Parameters
tx_hashis banned, false otherwise
virtual void kagome::transaction_pool::PoolModerator::updateBan ( )
pure virtual

Unbans transaction which ban time is exceeded

Implemented in kagome::transaction_pool::PoolModeratorImpl.


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