Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
TaprootSpendData Struct Reference

#include <standard.h>

Collaboration diagram for TaprootSpendData:
[legend]

Public Member Functions

void Merge (TaprootSpendData other)
 Merge other TaprootSpendData (for the same scriptPubKey) into this. More...
 

Public Attributes

XOnlyPubKey internal_key
 The BIP341 internal key. More...
 
uint256 merkle_root
 The Merkle root of the script tree (0 if no scripts). More...
 
std::map< std::pair< CScript, int >, std::set< std::vector< unsigned char >, ShortestVectorFirstComparator > > scripts
 Map from (script, leaf_version) to (sets of) control blocks. More...
 

Detailed Description

Definition at line 223 of file standard.h.

Member Function Documentation

◆ Merge()

void TaprootSpendData::Merge ( TaprootSpendData  other)

Merge other TaprootSpendData (for the same scriptPubKey) into this.

Definition at line 399 of file standard.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ internal_key

XOnlyPubKey TaprootSpendData::internal_key

The BIP341 internal key.

Definition at line 226 of file standard.h.

◆ merkle_root

uint256 TaprootSpendData::merkle_root

The Merkle root of the script tree (0 if no scripts).

Definition at line 228 of file standard.h.

◆ scripts

std::map<std::pair<CScript, int>, std::set<std::vector<unsigned char>, ShortestVectorFirstComparator> > TaprootSpendData::scripts

Map from (script, leaf_version) to (sets of) control blocks.

More than one control block for a given script is only possible if it appears in multiple branches of the tree. We keep them all so that inference can reconstruct the full tree. Within each set, the control blocks are sorted by size, so that the signing logic can easily prefer the cheapest one.

Definition at line 235 of file standard.h.


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