Monero
Loading...
Searching...
No Matches
blockchain_ancestry.cpp File Reference
#include <unordered_map>
#include <unordered_set>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/archive/portable_binary_iarchive.hpp>
#include <boost/archive/portable_binary_oarchive.hpp>
#include <boost/filesystem/path.hpp>
#include "common/unordered_containers_boost_serialization.h"
#include "common/command_line.h"
#include "common/varint.h"
#include "cryptonote_basic/cryptonote_boost_serialization.h"
#include "cryptonote_core/tx_pool.h"
#include "cryptonote_core/cryptonote_core.h"
#include "cryptonote_core/blockchain.h"
#include "blockchain_db/blockchain_db.h"
#include "version.h"
Include dependency graph for blockchain_ancestry.cpp:

Classes

struct  ancestor
struct  std::hash< ancestor >
struct  tx_data_t
struct  ancestry_state_t

Namespaces

namespace  std

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "bcutil"

Functions

static void add_ancestor (std::unordered_map< ancestor, unsigned int > &ancestry, uint64_t amount, uint64_t offset)
static size_t get_full_ancestry (const std::unordered_map< ancestor, unsigned int > &ancestry)
static size_t get_deduplicated_ancestry (const std::unordered_map< ancestor, unsigned int > &ancestry)
static void add_ancestry (std::unordered_map< crypto::hash, std::unordered_set< ancestor > > &ancestry, const crypto::hash &txid, const std::unordered_set< ancestor > &ancestors)
static void add_ancestry (std::unordered_map< crypto::hash, std::unordered_set< ancestor > > &ancestry, const crypto::hash &txid, const ancestor &new_ancestor)
static std::unordered_set< ancestorget_ancestry (const std::unordered_map< crypto::hash, std::unordered_set< ancestor > > &ancestry, const crypto::hash &txid)
static bool get_block_from_height (ancestry_state_t &state, BlockchainDB *db, uint64_t height, cryptonote::block &b)
static bool get_transaction (ancestry_state_t &state, BlockchainDB *db, const crypto::hash &txid, ::tx_data_t &tx_data)
static bool get_output_txid (ancestry_state_t &state, BlockchainDB *db, uint64_t amount, uint64_t offset, crypto::hash &txid)
int main (int argc, char *argv[])

Variables

static bool stop_requested = false
static uint64_t cached_txes = 0
static uint64_t cached_blocks = 0
static uint64_t cached_outputs = 0
static uint64_t total_txes = 0
static uint64_t total_blocks = 0
static uint64_t total_outputs = 0
static bool opt_cache_outputs = false
static bool opt_cache_txes = false
static bool opt_cache_blocks = false

Macro Definition Documentation

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "bcutil"

Function Documentation

◆ add_ancestor()

void add_ancestor ( std::unordered_map< ancestor, unsigned int > & ancestry,
uint64_t amount,
uint64_t offset )
static

◆ add_ancestry() [1/2]

void add_ancestry ( std::unordered_map< crypto::hash, std::unordered_set< ancestor > > & ancestry,
const crypto::hash & txid,
const ancestor & new_ancestor )
static

◆ add_ancestry() [2/2]

void add_ancestry ( std::unordered_map< crypto::hash, std::unordered_set< ancestor > > & ancestry,
const crypto::hash & txid,
const std::unordered_set< ancestor > & ancestors )
static

◆ get_ancestry()

std::unordered_set< ancestor > get_ancestry ( const std::unordered_map< crypto::hash, std::unordered_set< ancestor > > & ancestry,
const crypto::hash & txid )
static

◆ get_block_from_height()

bool get_block_from_height ( ancestry_state_t & state,
BlockchainDB * db,
uint64_t height,
cryptonote::block & b )
static

◆ get_deduplicated_ancestry()

size_t get_deduplicated_ancestry ( const std::unordered_map< ancestor, unsigned int > & ancestry)
static

◆ get_full_ancestry()

size_t get_full_ancestry ( const std::unordered_map< ancestor, unsigned int > & ancestry)
static

◆ get_output_txid()

bool get_output_txid ( ancestry_state_t & state,
BlockchainDB * db,
uint64_t amount,
uint64_t offset,
crypto::hash & txid )
static

◆ get_transaction()

bool get_transaction ( ancestry_state_t & state,
BlockchainDB * db,
const crypto::hash & txid,
::tx_data_t & tx_data )
static

◆ main()

int main ( int argc,
char * argv[] )

Variable Documentation

◆ cached_blocks

uint64_t cached_blocks = 0
static

◆ cached_outputs

uint64_t cached_outputs = 0
static

◆ cached_txes

uint64_t cached_txes = 0
static

◆ opt_cache_blocks

bool opt_cache_blocks = false
static

◆ opt_cache_outputs

bool opt_cache_outputs = false
static

◆ opt_cache_txes

bool opt_cache_txes = false
static

◆ stop_requested

bool stop_requested = false
static

◆ total_blocks

uint64_t total_blocks = 0
static

◆ total_outputs

uint64_t total_outputs = 0
static

◆ total_txes

uint64_t total_txes = 0
static