diff options
author | Alex Morcos <morcos@chaincode.com> | 2016-02-12 15:57:15 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2016-03-21 10:46:25 -0400 |
commit | 9e072a6e66efbda7d39bf61eded21d2b324323be (patch) | |
tree | c9e3686bb2b7cdb50254656a7302d66ac976f467 /src/net.h | |
parent | 29b2be6ad7898fcb871f6febbd45d0c7940398cd (diff) |
Implement "feefilter" P2P message.
The "feefilter" p2p message is used to inform other nodes of your mempool min fee which is the feerate that any new transaction must meet to be accepted to your mempool. This will allow them to filter invs to you according to this feerate.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -6,6 +6,7 @@ #ifndef BITCOIN_NET_H #define BITCOIN_NET_H +#include "amount.h" #include "bloom.h" #include "compat.h" #include "limitedmap.h" @@ -415,6 +416,11 @@ public: int64_t nMinPingUsecTime; // Whether a ping is requested. bool fPingQueued; + // Minimum fee rate with which to filter inv's to this node + CAmount minFeeFilter; + CCriticalSection cs_feeFilter; + CAmount lastSentFeeFilter; + int64_t nextSendTimeFeeFilter; CNode(SOCKET hSocketIn, const CAddress &addrIn, const std::string &addrNameIn = "", bool fInboundIn = false); ~CNode(); @@ -766,8 +772,8 @@ public: class CTransaction; -void RelayTransaction(const CTransaction& tx); -void RelayTransaction(const CTransaction& tx, const CDataStream& ss); +void RelayTransaction(const CTransaction& tx, CFeeRate feerate); +void RelayTransaction(const CTransaction& tx, CFeeRate feerate, const CDataStream& ss); /** Access to the (IP) address database (peers.dat) */ class CAddrDB |