mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-28 05:13:03 +02:00
wallet: remove mempool_sequence
from transactionAddedToMempool
This commit is contained in:
parent
f3bc1a7282
commit
bf19069c53
@ -268,7 +268,7 @@ public:
|
||||
{
|
||||
public:
|
||||
virtual ~Notifications() {}
|
||||
virtual void transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) {}
|
||||
virtual void transactionAddedToMempool(const CTransactionRef& tx) {}
|
||||
virtual void transactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) {}
|
||||
virtual void blockConnected(const BlockInfo& block) {}
|
||||
virtual void blockDisconnected(const BlockInfo& block) {}
|
||||
|
@ -420,7 +420,7 @@ public:
|
||||
virtual ~NotificationsProxy() = default;
|
||||
void TransactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) override
|
||||
{
|
||||
m_notifications->transactionAddedToMempool(tx, mempool_sequence);
|
||||
m_notifications->transactionAddedToMempool(tx);
|
||||
}
|
||||
void TransactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) override
|
||||
{
|
||||
@ -779,7 +779,7 @@ public:
|
||||
if (!m_node.mempool) return;
|
||||
LOCK2(::cs_main, m_node.mempool->cs);
|
||||
for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) {
|
||||
notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */);
|
||||
notifications.transactionAddedToMempool(entry.GetSharedTx());
|
||||
}
|
||||
}
|
||||
bool hasAssumedValidChain() override
|
||||
|
@ -946,7 +946,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_sync_tx_invalid_state_test, TestingSetup)
|
||||
|
||||
mtx.vin.clear();
|
||||
mtx.vin.push_back(CTxIn(tx_id_to_spend, 0));
|
||||
wallet.transactionAddedToMempool(MakeTransactionRef(mtx), 0);
|
||||
wallet.transactionAddedToMempool(MakeTransactionRef(mtx));
|
||||
const uint256& good_tx_id = mtx.GetHash();
|
||||
|
||||
{
|
||||
@ -967,7 +967,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_sync_tx_invalid_state_test, TestingSetup)
|
||||
static_cast<FailDatabase&>(wallet.GetDatabase()).m_pass = false;
|
||||
mtx.vin.clear();
|
||||
mtx.vin.push_back(CTxIn(good_tx_id, 0));
|
||||
BOOST_CHECK_EXCEPTION(wallet.transactionAddedToMempool(MakeTransactionRef(mtx), 0),
|
||||
BOOST_CHECK_EXCEPTION(wallet.transactionAddedToMempool(MakeTransactionRef(mtx)),
|
||||
std::runtime_error,
|
||||
HasReason("DB error adding transaction to wallet, write failed"));
|
||||
}
|
||||
|
@ -1355,7 +1355,7 @@ void CWallet::SyncTransaction(const CTransactionRef& ptx, const SyncTxState& sta
|
||||
MarkInputsDirty(ptx);
|
||||
}
|
||||
|
||||
void CWallet::transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) {
|
||||
void CWallet::transactionAddedToMempool(const CTransactionRef& tx) {
|
||||
LOCK(cs_wallet);
|
||||
SyncTransaction(tx, TxStateInMempool{});
|
||||
|
||||
|
@ -516,7 +516,7 @@ public:
|
||||
*/
|
||||
CWalletTx* AddToWallet(CTransactionRef tx, const TxState& state, const UpdateWalletTxFn& update_wtx=nullptr, bool fFlushOnClose=true, bool rescanning_old_block = false);
|
||||
bool LoadToWallet(const uint256& hash, const UpdateWalletTxFn& fill_wtx) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
void transactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) override;
|
||||
void transactionAddedToMempool(const CTransactionRef& tx) override;
|
||||
void blockConnected(const interfaces::BlockInfo& block) override;
|
||||
void blockDisconnected(const interfaces::BlockInfo& block) override;
|
||||
void updatedBlockTip() override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user