Bitcoin Core 31.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
CoinsViewOverlay::InputToFetch Struct Reference

The inputs of the block which is being fetched. More...

Collaboration diagram for CoinsViewOverlay::InputToFetch:
[legend]

Public Member Functions

 InputToFetch (const COutPoint &o LIFETIMEBOUND) noexcept
 
 InputToFetch (InputToFetch &&other) noexcept
 Move ctor is required for resizing m_inputs in StartFetching. More...
 

Public Attributes

std::atomic_flag ready {}
 Workers set this after setting the coin. The main thread tests this before reading the coin. More...
 
const COutPointoutpoint
 The outpoint of the input to fetch. More...
 
std::optional< Coincoin {std::nullopt}
 The coin that workers will fetch and main thread will insert into cache. More...
 

Detailed Description

The inputs of the block which is being fetched.

Definition at line 633 of file coins.h.

Constructor & Destructor Documentation

◆ InputToFetch() [1/2]

CoinsViewOverlay::InputToFetch::InputToFetch ( const COutPoint &o  LIFETIMEBOUND)
inlineexplicitnoexcept

Definition at line 642 of file coins.h.

◆ InputToFetch() [2/2]

CoinsViewOverlay::InputToFetch::InputToFetch ( InputToFetch &&  other)
inlinenoexcept

Move ctor is required for resizing m_inputs in StartFetching.

Elements will never move once parallel tasks are started, so we can assert that coin is nullopt and ready is false.

Definition at line 646 of file coins.h.

Member Data Documentation

◆ coin

std::optional<Coin> CoinsViewOverlay::InputToFetch::coin {std::nullopt}
mutable

The coin that workers will fetch and main thread will insert into cache.

Mutable so it can be moved in FetchCoinFromBase.

Definition at line 640 of file coins.h.

◆ outpoint

const COutPoint& CoinsViewOverlay::InputToFetch::outpoint

The outpoint of the input to fetch.

Definition at line 637 of file coins.h.

◆ ready

std::atomic_flag CoinsViewOverlay::InputToFetch::ready {}

Workers set this after setting the coin. The main thread tests this before reading the coin.

Definition at line 635 of file coins.h.


The documentation for this struct was generated from the following file: