Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Typedefs | Functions | Variables
txindex Namespace Reference

Classes

struct  BlockHashKey
 Key for looking up the sequence number assigned to the block with the given hash. More...
 
struct  BlockSeqKey
 Key for looking up the hash of the block with the given sequence number. More...
 
struct  BlockTxPosition
 The location of a transaction: the sequence number of the block that contains it and the transaction's serialized byte offset from the start of that block (including the header), so the on-disk position is simply block_data_pos + tx_offset_in_block. More...
 
struct  DBKey
 

Typedefs

using TxHashKeyPrefix = uint64_t
 

Functions

TxHashKeyPrefix CreateKeyPrefix (const SipHasher13UJ &hasher, const Txid &txid)
 
std::pair< uint8_t, uint256LegacyTxKey (const Txid &txid)
 Key of a legacy (pre-hashing) txindex row: the full txid under the 't' prefix. More...
 

Variables

constexpr uint8_t DB_TXINDEX_HASHED {'x'}
 
constexpr uint8_t DB_BLOCK_SEQ {'s'}
 
constexpr uint8_t DB_BLOCK_HASH {'h'}
 
const std::string DB_NEXT_BLOCK_SEQ {"next_block_seq"}
 
const std::string DB_TXID_HASH_SALT {"txid_hash_salt"}
 
const std::string DB_BEST_BLOCK_V2 {"best_block_v2"}
 
constexpr uint8_t DB_TXINDEX {'t'}
 Prefix of a legacy (pre-hashing) txindex row. More...
 
constexpr std::array< std::byte, 0 > EMPTY_VALUE {}
 Empty value of a hashed txindex row, whose position is encoded in its key. More...
 
constexpr uint32_t BLOCK_HEADER_SIZE {80}
 Serialized size of a block header, the offset of the first byte after it. More...
 
constexpr int HASH_PREFIX_SIZE {5}
 

Typedef Documentation

◆ TxHashKeyPrefix

using txindex::TxHashKeyPrefix = typedef uint64_t

Definition at line 100 of file txindex_key.h.

Function Documentation

◆ CreateKeyPrefix()

TxHashKeyPrefix txindex::CreateKeyPrefix ( const SipHasher13UJ hasher,
const Txid txid 
)
inline

Definition at line 102 of file txindex_key.h.

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

◆ LegacyTxKey()

std::pair< uint8_t, uint256 > txindex::LegacyTxKey ( const Txid txid)
inline

Key of a legacy (pre-hashing) txindex row: the full txid under the 't' prefix.

Definition at line 121 of file txindex_key.h.

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

Variable Documentation

◆ BLOCK_HEADER_SIZE

constexpr uint32_t txindex::BLOCK_HEADER_SIZE {80}
constexpr

Serialized size of a block header, the offset of the first byte after it.

Definition at line 48 of file txindex_key.h.

◆ DB_BEST_BLOCK_V2

const std::string txindex::DB_BEST_BLOCK_V2 {"best_block_v2"}
inline

Definition at line 40 of file txindex_key.h.

◆ DB_BLOCK_HASH

constexpr uint8_t txindex::DB_BLOCK_HASH {'h'}
constexpr

Definition at line 37 of file txindex_key.h.

◆ DB_BLOCK_SEQ

constexpr uint8_t txindex::DB_BLOCK_SEQ {'s'}
constexpr

Definition at line 36 of file txindex_key.h.

◆ DB_NEXT_BLOCK_SEQ

const std::string txindex::DB_NEXT_BLOCK_SEQ {"next_block_seq"}
inline

Definition at line 38 of file txindex_key.h.

◆ DB_TXID_HASH_SALT

const std::string txindex::DB_TXID_HASH_SALT {"txid_hash_salt"}
inline

Definition at line 39 of file txindex_key.h.

◆ DB_TXINDEX

constexpr uint8_t txindex::DB_TXINDEX {'t'}
constexpr

Prefix of a legacy (pre-hashing) txindex row.

Definition at line 42 of file txindex_key.h.

◆ DB_TXINDEX_HASHED

constexpr uint8_t txindex::DB_TXINDEX_HASHED {'x'}
constexpr

Definition at line 35 of file txindex_key.h.

◆ EMPTY_VALUE

constexpr std::array<std::byte, 0> txindex::EMPTY_VALUE {}
inlineconstexpr

Empty value of a hashed txindex row, whose position is encoded in its key.

Definition at line 45 of file txindex_key.h.

◆ HASH_PREFIX_SIZE

constexpr int txindex::HASH_PREFIX_SIZE {5}
constexpr

Definition at line 99 of file txindex_key.h.