mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 92c8e1849d into merged_master (Bitcoin PR bitcoin/bitcoin#25494)
This commit is contained in:
commit
2081703f71
21 changed files with 274 additions and 143 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include <netaddress.h>
|
||||
#include <netbase.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <kernel/chain.h>
|
||||
#include <node/coin.h>
|
||||
#include <node/context.h>
|
||||
#include <node/transaction.h>
|
||||
|
|
@ -401,6 +402,7 @@ bool FillBlock(const CBlockIndex* index, const FoundBlock& block, UniqueLock<Rec
|
|||
if (block.m_max_time) *block.m_max_time = index->GetBlockTimeMax();
|
||||
if (block.m_mtp_time) *block.m_mtp_time = index->GetMedianTimePast();
|
||||
if (block.m_in_active_chain) *block.m_in_active_chain = active[index->nHeight] == index;
|
||||
if (block.m_locator) { *block.m_locator = active.GetLocator(index); }
|
||||
if (block.m_next_block) FillBlock(active[index->nHeight] == index ? active[index->nHeight + 1] : nullptr, *block.m_next_block, lock, active);
|
||||
if (block.m_data) {
|
||||
REVERSE_LOCK(lock);
|
||||
|
|
@ -426,11 +428,11 @@ public:
|
|||
}
|
||||
void BlockConnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
m_notifications->blockConnected(*block, index->nHeight);
|
||||
m_notifications->blockConnected(kernel::MakeBlockInfo(index, block.get()));
|
||||
}
|
||||
void BlockDisconnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
m_notifications->blockDisconnected(*block, index->nHeight);
|
||||
m_notifications->blockDisconnected(kernel::MakeBlockInfo(index, block.get()));
|
||||
}
|
||||
void UpdatedBlockTip(const CBlockIndex* index, const CBlockIndex* fork_index, bool is_ibd) override
|
||||
{
|
||||
|
|
@ -798,6 +800,7 @@ public:
|
|||
}
|
||||
// end ELEMENTS
|
||||
|
||||
NodeContext* context() override { return &m_node; }
|
||||
NodeContext& m_node;
|
||||
};
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue