Skip to content

Commit bf19069

Browse files
committed
wallet: remove mempool_sequence from transactionAddedToMempool
1 parent f3bc1a7 commit bf19069

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/interfaces/chain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Chain
268268
{
269269
public:
270270
virtual ~Notifications() {}
271-
virtual void transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) {}
271+
virtual void transactionAddedToMempool(const CTransactionRef& tx) {}
272272
virtual void transactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) {}
273273
virtual void blockConnected(const BlockInfo& block) {}
274274
virtual void blockDisconnected(const BlockInfo& block) {}

src/node/interfaces.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ class NotificationsProxy : public CValidationInterface
420420
virtual ~NotificationsProxy() = default;
421421
void TransactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) override
422422
{
423-
m_notifications->transactionAddedToMempool(tx, mempool_sequence);
423+
m_notifications->transactionAddedToMempool(tx);
424424
}
425425
void TransactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) override
426426
{
@@ -779,7 +779,7 @@ class ChainImpl : public Chain
779779
if (!m_node.mempool) return;
780780
LOCK2(::cs_main, m_node.mempool->cs);
781781
for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) {
782-
notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */);
782+
notifications.transactionAddedToMempool(entry.GetSharedTx());
783783
}
784784
}
785785
bool hasAssumedValidChain() override

src/wallet/test/wallet_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_sync_tx_invalid_state_test, TestingSetup)
946946

947947
mtx.vin.clear();
948948
mtx.vin.push_back(CTxIn(tx_id_to_spend, 0));
949-
wallet.transactionAddedToMempool(MakeTransactionRef(mtx), 0);
949+
wallet.transactionAddedToMempool(MakeTransactionRef(mtx));
950950
const uint256& good_tx_id = mtx.GetHash();
951951

952952
{
@@ -967,7 +967,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_sync_tx_invalid_state_test, TestingSetup)
967967
static_cast<FailDatabase&>(wallet.GetDatabase()).m_pass = false;
968968
mtx.vin.clear();
969969
mtx.vin.push_back(CTxIn(good_tx_id, 0));
970-
BOOST_CHECK_EXCEPTION(wallet.transactionAddedToMempool(MakeTransactionRef(mtx), 0),
970+
BOOST_CHECK_EXCEPTION(wallet.transactionAddedToMempool(MakeTransactionRef(mtx)),
971971
std::runtime_error,
972972
HasReason("DB error adding transaction to wallet, write failed"));
973973
}

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ void CWallet::SyncTransaction(const CTransactionRef& ptx, const SyncTxState& sta
13551355
MarkInputsDirty(ptx);
13561356
}
13571357

1358-
void CWallet::transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) {
1358+
void CWallet::transactionAddedToMempool(const CTransactionRef& tx) {
13591359
LOCK(cs_wallet);
13601360
SyncTransaction(tx, TxStateInMempool{});
13611361

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
516516
*/
517517
CWalletTx* AddToWallet(CTransactionRef tx, const TxState& state, const UpdateWalletTxFn& update_wtx=nullptr, bool fFlushOnClose=true, bool rescanning_old_block = false);
518518
bool LoadToWallet(const uint256& hash, const UpdateWalletTxFn& fill_wtx) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
519-
void transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) override;
519+
void transactionAddedToMempool(const CTransactionRef& tx) override;
520520
void blockConnected(const interfaces::BlockInfo& block) override;
521521
void blockDisconnected(const interfaces::BlockInfo& block) override;
522522
void updatedBlockTip() override;

0 commit comments

Comments
 (0)