mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 62cb4009c2 into merged_master (Bitcoin PR bitcoin/bitcoin#22215)
This commit is contained in:
commit
640ebd5e5a
2 changed files with 5 additions and 1 deletions
|
|
@ -37,7 +37,9 @@ namespace interfaces {
|
|||
class Handler;
|
||||
class Wallet;
|
||||
|
||||
//! Helper for findBlock to selectively return pieces of block data.
|
||||
//! Helper for findBlock to selectively return pieces of block data. If block is
|
||||
//! found, data will be returned by setting specified output variables. If block
|
||||
//! is not found, output variables will keep their previous values.
|
||||
class FoundBlock
|
||||
{
|
||||
public:
|
||||
|
|
@ -62,6 +64,7 @@ public:
|
|||
bool* m_in_active_chain = nullptr;
|
||||
const FoundBlock* m_next_block = nullptr;
|
||||
CBlock* m_data = nullptr;
|
||||
mutable bool found = false;
|
||||
};
|
||||
|
||||
//! Interface giving clients (wallet processes, maybe other analysis tools in
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ bool FillBlock(const CBlockIndex* index, const FoundBlock& block, UniqueLock<Rec
|
|||
REVERSE_LOCK(lock);
|
||||
if (!ReadBlockFromDisk(*block.m_data, index, Params().GetConsensus())) block.m_data->SetNull();
|
||||
}
|
||||
block.found = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue