Go to the documentation of this file.
17 #ifndef USGOV_ab4c3f8b32c28ebe389cd176419697be221f06c33dafc174ba9b3c3cf56ff3fe
18 #define USGOV_ab4c3f8b32c28ebe389cd176419697be221f06c33dafc174ba9b3c3cf56ff3fe
31 namespace us {
namespace gov {
34 using socket::datagram;
77 uint64_t multiplicity{0};
106 void merge(D& v1,
const D& v2)
const {
109 void end_merge(D& v,
const uint64_t& multiplicity)
const {
110 double m=multiplicity;
140 unordered_map<D,uint64_t>
m;
static local_delta * create(istream &)
static delta * create(int id)
static delta * create(istream &)
virtual ~local_delta()
Definition: app.h:50
app::hasher_t hasher_t
Definition: app.h:48
crypto::ripemd160 hasher_t
Definition: app.h:44
void merge(D &v1, const D &v2) const
Definition: app.h:106
static local_delta * create_prev(int appid, istream &)
static unsigned int get_seed()
virtual void hash_data_to_sign(crypto::ec::sigmsg_hasher_t &) const =0
chaininfo_t()
Definition: app.h:97
relay::peer_t peer_t
Definition: daemon.h:31
Definition: ripemd160.h:38
delta()
Definition: app.h:68
virtual bool load_db_prev(istream &)=0
virtual void end_merge()=0
virtual int app_id() const =0
app::hash_t hash_t
Definition: app.h:49
void merge(const D &v)
Definition: app.h:117
virtual local_delta * create_local_delta()=0
virtual bool load_db(istream &)=0
static chaininfo_t chaininfo
Definition: app.h:100
hasher_t::value_type hash_t
Definition: app.h:45
virtual void from_stream(istream &)=0
Definition: datagram.h:44
static delta * create_prev(int id, istream &)
id::daemon daemon
Definition: daemon.h:25
virtual bool process_query(peer_t *, datagram *)
Definition: app.h:90
virtual void save_db(ostream &) const =0
void end_merge(D &v)
Definition: app.h:126
static delta * create(int id, istream &)
hash_t last_delta_imported
Definition: app.h:98
unordered_map< D, uint64_t > m
Definition: app.h:140
virtual uint64_t merge(local_delta *other)
virtual bool shell_command(istream &, ostream &)
virtual void to_stream(ostream &) const =0
Definition: ripemd160.h:34
virtual int get_id() const =0
static local_delta * create(int id)
virtual void hash_data(hasher_t &) const =0
#define likely(x)
Definition: likely.h:29
virtual ~app()
Definition: app.h:81
app(daemon &e)
Definition: app.h:80
virtual void from_stream_prev(istream &)=0
void end_merge(D &v, const uint64_t &multiplicity) const
Definition: app.h:109
virtual void to_stream(ostream &) const =0
daemon & demon
Definition: app.h:101
virtual string get_name() const =0
Definition: evidence.h:31
virtual ~delta()
Definition: app.h:69
virtual bool process(const evidence &)=0
hash_t compute_hash() const
static local_delta * create(int appid, istream &)