mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Suggested interfaces::Chain cleanups from #15288
Mostly documentation improvements requested in the last review of #15288 before it was merged (https://github.com/bitcoin/bitcoin/pull/15288#pullrequestreview-210241864)
This commit is contained in:
parent
45f434f44d
commit
4d4e4c6448
3 changed files with 36 additions and 14 deletions
|
|
@ -148,7 +148,7 @@ class LockImpl : public Chain::Lock
|
|||
LockAnnotation lock(::cs_main);
|
||||
return CheckFinalTx(tx);
|
||||
}
|
||||
bool submitToMemoryPool(CTransactionRef tx, CAmount absurd_fee, CValidationState& state) override
|
||||
bool submitToMemoryPool(const CTransactionRef& tx, CAmount absurd_fee, CValidationState& state) override
|
||||
{
|
||||
LockAnnotation lock(::cs_main);
|
||||
return AcceptToMemoryPool(::mempool, state, tx, nullptr /* missing inputs */, nullptr /* txn replaced */,
|
||||
|
|
@ -207,8 +207,8 @@ public:
|
|||
bool hasDescendantsInMempool(const uint256& txid) override
|
||||
{
|
||||
LOCK(::mempool.cs);
|
||||
auto it_mp = ::mempool.mapTx.find(txid);
|
||||
return it_mp != ::mempool.mapTx.end() && it_mp->GetCountWithDescendants() > 1;
|
||||
auto it = ::mempool.GetIter(txid);
|
||||
return it && (*it)->GetCountWithDescendants() > 1;
|
||||
}
|
||||
void relayTransaction(const uint256& txid) override
|
||||
{
|
||||
|
|
@ -219,7 +219,7 @@ public:
|
|||
{
|
||||
::mempool.GetTransactionAncestry(txid, ancestors, descendants);
|
||||
}
|
||||
bool checkChainLimits(CTransactionRef tx) override
|
||||
bool checkChainLimits(const CTransactionRef& tx) override
|
||||
{
|
||||
LockPoints lp;
|
||||
CTxMemPoolEntry entry(tx, 0, 0, 0, false, 0, lp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue