Bitcoin ABC 0.30.7
P2P Digital Currency
Typedefs | Functions | Variables
salvage.cpp File Reference
#include <config.h>
#include <streams.h>
#include <util/fs.h>
#include <util/translation.h>
#include <wallet/salvage.h>
#include <wallet/wallet.h>
#include <wallet/walletdb.h>
Include dependency graph for salvage.cpp:

Go to the source code of this file.

Typedefs

typedef std::pair< std::vector< uint8_t >, std::vector< uint8_t > > KeyValPair
 

Functions

static bool KeyFilter (const std::string &type)
 
bool RecoverDatabaseFile (const fs::path &file_path, bilingual_str &error, std::vector< bilingual_str > &warnings)
 

Variables

static const char * HEADER_END = "HEADER=END"
 
static const char * DATA_END = "DATA=END"
 

Typedef Documentation

◆ KeyValPair

typedef std::pair<std::vector<uint8_t>, std::vector<uint8_t> > KeyValPair

Definition at line 18 of file salvage.cpp.

Function Documentation

◆ KeyFilter()

static bool KeyFilter ( const std::string &  type)
static

Definition at line 20 of file salvage.cpp.

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

◆ RecoverDatabaseFile()

bool RecoverDatabaseFile ( const fs::path file_path,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)

Salvage data from a file. The DB_AGGRESSIVE flag is being used (see berkeley DB->verify() method documentation). key/value pairs are appended to salvagedData which are then written out to a new wallet file. NOTE: reads the entire database into memory, so cannot be used for huge databases.

Definition at line 24 of file salvage.cpp.

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

Variable Documentation

◆ DATA_END

const char* DATA_END = "DATA=END"
static

Definition at line 17 of file salvage.cpp.

◆ HEADER_END

const char* HEADER_END = "HEADER=END"
static

Definition at line 15 of file salvage.cpp.