Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
double guessVerificationProgress(const BlockHash &block_hash) override { | double guessVerificationProgress(const BlockHash &block_hash) override { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
return GuessVerificationProgress(Params().TxData(), | return GuessVerificationProgress(Params().TxData(), | ||||
LookupBlockIndex(block_hash)); | LookupBlockIndex(block_hash)); | ||||
} | } | ||||
bool hasDescendantsInMempool(const TxId &txid) override { | |||||
LOCK(::g_mempool.cs); | |||||
auto it_mp = ::g_mempool.mapTx.find(txid); | |||||
return it_mp != ::g_mempool.mapTx.end() && | |||||
it_mp->GetCountWithDescendants() > 1; | |||||
} | |||||
}; | }; | ||||
} // namespace | } // namespace | ||||
std::unique_ptr<Chain> MakeChain() { | std::unique_ptr<Chain> MakeChain() { | ||||
return std::make_unique<ChainImpl>(); | return std::make_unique<ChainImpl>(); | ||||
} | } | ||||
} // namespace interfaces | } // namespace interfaces |