Skip to content

Commit b8eecf8

Browse files
author
Antoine Riard
committed
Remove unused submitToMemoryPool and relayTransactions Chain interfaces
1 parent 8753f56 commit b8eecf8

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/interfaces/chain.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,6 @@ class LockImpl : public Chain::Lock, public UniqueLock<CCriticalSection>
151151
LockAssertion lock(::cs_main);
152152
return CheckFinalTx(tx);
153153
}
154-
bool submitToMemoryPool(const CTransactionRef& tx, CAmount absurd_fee, CValidationState& state) override
155-
{
156-
LockAssertion lock(::cs_main);
157-
return AcceptToMemoryPool(::mempool, state, tx, nullptr /* missing inputs */, nullptr /* txn replaced */,
158-
false /* bypass limits */, absurd_fee);
159-
}
160154

161155
using UniqueLock::UniqueLock;
162156
};
@@ -292,10 +286,6 @@ class ChainImpl : public Chain
292286
auto it = ::mempool.GetIter(txid);
293287
return it && (*it)->GetCountWithDescendants() > 1;
294288
}
295-
void relayTransaction(const uint256& txid) override
296-
{
297-
RelayTransaction(txid, *g_connman);
298-
}
299289
bool broadcastTransaction(const CTransactionRef& tx, std::string& err_string, const CAmount& max_tx_fee, bool relay) override
300290
{
301291
const TransactionError err = BroadcastTransaction(tx, err_string, max_tx_fee, relay, /*wait_callback*/ false);

src/interfaces/chain.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ class Wallet;
4343
//! asynchronously
4444
//! (https://github.com/bitcoin/bitcoin/pull/10973#issuecomment-380101269).
4545
//!
46-
//! * The relayTransactions() and submitToMemoryPool() methods could be replaced
47-
//! with a higher-level broadcastTransaction method
48-
//! (https://github.com/bitcoin/bitcoin/pull/14978#issuecomment-459373984).
49-
//!
5046
//! * The initMessages() and loadWallet() methods which the wallet uses to send
5147
//! notifications to the GUI should go away when GUI and wallet can directly
5248
//! communicate with each other without going through the node
@@ -127,11 +123,6 @@ class Chain
127123

128124
//! Check if transaction will be final given chain height current time.
129125
virtual bool checkFinalTx(const CTransaction& tx) = 0;
130-
131-
//! Add transaction to memory pool if the transaction fee is below the
132-
//! amount specified by absurd_fee. Returns false if the transaction
133-
//! could not be added due to the fee or for another reason.
134-
virtual bool submitToMemoryPool(const CTransactionRef& tx, CAmount absurd_fee, CValidationState& state) = 0;
135126
};
136127

137128
//! Return Lock interface. Chain is locked when this is called, and
@@ -164,9 +155,6 @@ class Chain
164155
//! Check if transaction has descendants in mempool.
165156
virtual bool hasDescendantsInMempool(const uint256& txid) = 0;
166157

167-
//! Relay transaction.
168-
virtual void relayTransaction(const uint256& txid) = 0;
169-
170158
//! Transaction is added to memory pool, if the transaction fee is below the
171159
//! amount specified by max_tx_fee, and broadcast to all peers if relay is set to true.
172160
//! Return false if the transaction could not be added due to the fee or for another reason.

0 commit comments

Comments
 (0)