plebble
us::gov::cash::app Struct Referencefinal

#include <app.h>

Inheritance diagram for us::gov::cash::app:
Collaboration diagram for us::gov::cash::app:

Classes

struct  db_t
 
struct  delta
 
struct  local_delta
 
struct  query_accounts_t
 

Public Types

typedef engine::app b
 
typedef local_delta::box_t box_t
 
typedef local_delta::account_t account_t
 
typedef local_delta::accounts_t accounts_t
 
typedef local_delta::safe_deposit_box::fileattr_t fileattr_t
 
- Public Types inherited from us::gov::engine::app
typedef crypto::ripemd160 hasher_t
 
typedef hasher_t::value_type hash_t
 

Public Member Functions

 app (engine::daemon &)
 
 app (const app &)=delete
 
appoperator= (const app &)=delete
 
 ~app () override
 
engine::app::local_deltacreate_local_delta () override
 
bool process_query (peer_t *, datagram *) override
 
string get_name () const override
 
bool process (const evidence &) override
 
bool process (const tx &, const tx::section_t &, local_delta::batch_t &, cash_t &fee)
 
bool process (const tx &, const tx::sections_t &, local_delta::batch_t &, cash_t &fee)
 
bool process (const tx &)
 
bool process (const map_tx &)
 
bool process (const file_tx &)
 
bool process (const ttx &)
 
void report_wallet (const tx &t, const string &feedback) const
 
void save_db (ostream &) const override
 
bool load_db (istream &) override
 
bool load_db_prev (istream &) override
 
void clear () override
 
bool process_tx (peer_t *, datagram *)
 
void cash_query (peer_t *, datagram *)
 
void search_kv (peer_t *, datagram *)
 
bool account_state (const local_delta::batch_t &batch, const hash_t &address, account_t &acc) const
 
bool checksig (const size_t &this_index, const string &locking_program_input, const tx &) const
 
int get_id () const override
 
bool shell_command (istream &, ostream &) override
 
void import (const engine::app::delta &, const engine::pow_t &) override
 
void update_ledger (const delta &g, vector< pair< hash_t, uint32_t >> &old_files, vector< pair< hash_t, uint32_t >> &new_files)
 
cash_t charge_ledger ()
 
cash_t pay_services () const
 
void tax_accounts (const cash_t &amount)
 
void process_profit (cash_t &profit)
 
void pay_subsidy (const cash_t &amount, const engine::pow_t &w)
 
void get_files (vector< pair< hash_t, uint32_t >> &) const
 
void get_files (vector< pair< hash_t, fileattr_t >> &) const
 
void get_files (set< hash_t > &) const
 
void file_hash (peer_t *c, datagram *d) const
 
- Public Member Functions inherited from us::gov::engine::app
 app (daemon &e)
 

Static Public Member Functions

static bool unlock (const hash_t &address, const hash_t &locking_program, const string &locking_program_input, const tx &)
 
static bool unlock (const hash_t &address, const hash_t &locking_program, const map_tx &t)
 
static bool unlock (const hash_t &address, const hash_t &locking_program, const file_tx &t)
 
static bool unlock (const hash_t &address, const hash_t &locking_program, const ttx &t)
 
static constexpr int id ()
 
static evidenceevidence_from_stream (uint8_t evid, istream &is)
 
static bool check_amounts (const tx &)
 
- Static Public Member Functions inherited from us::gov::engine::app
static unsigned int get_seed ()
 

Public Attributes

db_t db
 
local_deltapool {0}
 
mutex mx_pool
 
vector< pair< hash_t, uint32_t > > old_files
 
vector< pair< hash_t, uint32_t > > new_files
 
- Public Attributes inherited from us::gov::engine::app
daemondemon
 

Static Public Attributes

constexpr static const char * name ={"cash"}
 
- Static Public Attributes inherited from us::gov::engine::app
static chaininfo_t chaininfo
 

Member Typedef Documentation

◆ account_t

◆ accounts_t

◆ b

◆ box_t

◆ fileattr_t

Constructor & Destructor Documentation

◆ app() [1/2]

us::gov::cash::app::app ( engine::daemon )

◆ app() [2/2]

us::gov::cash::app::app ( const app )
delete

◆ ~app()

us::gov::cash::app::~app ( )
overridevirtual

Reimplemented from us::gov::engine::app.

Member Function Documentation

◆ account_state()

bool us::gov::cash::app::account_state ( const local_delta::batch_t batch,
const hash_t address,
account_t acc 
) const

◆ cash_query()

void us::gov::cash::app::cash_query ( peer_t ,
datagram  
)

◆ charge_ledger()

cash_t us::gov::cash::app::charge_ledger ( )

◆ check_amounts()

static bool us::gov::cash::app::check_amounts ( const tx )
static

◆ checksig()

bool us::gov::cash::app::checksig ( const size_t &  this_index,
const string &  locking_program_input,
const tx  
) const

◆ clear()

void us::gov::cash::app::clear ( )
overridevirtual

Implements us::gov::engine::app.

◆ create_local_delta()

engine::app::local_delta* us::gov::cash::app::create_local_delta ( )
overridevirtual

Implements us::gov::engine::app.

◆ evidence_from_stream()

static evidence* us::gov::cash::app::evidence_from_stream ( uint8_t  evid,
istream &  is 
)
static

◆ file_hash()

void us::gov::cash::app::file_hash ( peer_t c,
datagram d 
) const

◆ get_files() [1/3]

void us::gov::cash::app::get_files ( set< hash_t > &  ) const

◆ get_files() [2/3]

void us::gov::cash::app::get_files ( vector< pair< hash_t, fileattr_t >> &  ) const

◆ get_files() [3/3]

void us::gov::cash::app::get_files ( vector< pair< hash_t, uint32_t >> &  ) const

◆ get_id()

int us::gov::cash::app::get_id ( ) const
inlineoverridevirtual

Implements us::gov::engine::app.

◆ get_name()

string us::gov::cash::app::get_name ( ) const
inlineoverridevirtual

Implements us::gov::engine::app.

◆ id()

static constexpr int us::gov::cash::app::id ( )
inlinestaticconstexpr

◆ import()

void us::gov::cash::app::import ( const engine::app::delta ,
const engine::pow_t  
)
overridevirtual

Implements us::gov::engine::app.

◆ load_db()

bool us::gov::cash::app::load_db ( istream &  )
overridevirtual

Implements us::gov::engine::app.

◆ load_db_prev()

bool us::gov::cash::app::load_db_prev ( istream &  )
overridevirtual

Implements us::gov::engine::app.

◆ operator=()

app& us::gov::cash::app::operator= ( const app )
delete

◆ pay_services()

cash_t us::gov::cash::app::pay_services ( ) const

◆ pay_subsidy()

void us::gov::cash::app::pay_subsidy ( const cash_t amount,
const engine::pow_t w 
)

◆ process() [1/7]

bool us::gov::cash::app::process ( const evidence )
overridevirtual

Implements us::gov::engine::app.

◆ process() [2/7]

bool us::gov::cash::app::process ( const file_tx )

◆ process() [3/7]

bool us::gov::cash::app::process ( const map_tx )

◆ process() [4/7]

bool us::gov::cash::app::process ( const ttx )

◆ process() [5/7]

bool us::gov::cash::app::process ( const tx )

◆ process() [6/7]

bool us::gov::cash::app::process ( const tx ,
const tx::section_t ,
local_delta::batch_t ,
cash_t fee 
)

◆ process() [7/7]

bool us::gov::cash::app::process ( const tx ,
const tx::sections_t ,
local_delta::batch_t ,
cash_t fee 
)

◆ process_profit()

void us::gov::cash::app::process_profit ( cash_t profit)

◆ process_query()

bool us::gov::cash::app::process_query ( peer_t ,
datagram  
)
overridevirtual

Reimplemented from us::gov::engine::app.

◆ process_tx()

bool us::gov::cash::app::process_tx ( peer_t ,
datagram  
)

◆ report_wallet()

void us::gov::cash::app::report_wallet ( const tx t,
const string &  feedback 
) const

◆ save_db()

void us::gov::cash::app::save_db ( ostream &  ) const
overridevirtual

Implements us::gov::engine::app.

◆ search_kv()

void us::gov::cash::app::search_kv ( peer_t ,
datagram  
)

◆ shell_command()

bool us::gov::cash::app::shell_command ( istream &  ,
ostream &   
)
overridevirtual

Reimplemented from us::gov::engine::app.

◆ tax_accounts()

void us::gov::cash::app::tax_accounts ( const cash_t amount)

◆ unlock() [1/4]

static bool us::gov::cash::app::unlock ( const hash_t address,
const hash_t locking_program,
const file_tx t 
)
static

◆ unlock() [2/4]

static bool us::gov::cash::app::unlock ( const hash_t address,
const hash_t locking_program,
const map_tx t 
)
static

◆ unlock() [3/4]

static bool us::gov::cash::app::unlock ( const hash_t address,
const hash_t locking_program,
const string &  locking_program_input,
const tx  
)
static

◆ unlock() [4/4]

static bool us::gov::cash::app::unlock ( const hash_t address,
const hash_t locking_program,
const ttx t 
)
static

◆ update_ledger()

void us::gov::cash::app::update_ledger ( const delta g,
vector< pair< hash_t, uint32_t >> &  old_files,
vector< pair< hash_t, uint32_t >> &  new_files 
)

Member Data Documentation

◆ db

db_t us::gov::cash::app::db

◆ mx_pool

mutex us::gov::cash::app::mx_pool

◆ name

constexpr static const char* us::gov::cash::app::name ={"cash"}
staticconstexpr

◆ new_files

vector<pair<hash_t,uint32_t> > us::gov::cash::app::new_files

◆ old_files

vector<pair<hash_t,uint32_t> > us::gov::cash::app::old_files

◆ pool

local_delta* us::gov::cash::app::pool {0}

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