MCPcopy Create free account
hub / github.com/cryptonomex/graphene / database_api_impl

Method database_api_impl

libraries/app/database_api.cpp:182–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180database_api::~database_api() {}
181
182database_api_impl::database_api_impl( graphene::chain::database& db ):_db(db)
183{
184 wlog("creating database api ${x}", ("x",int64_t(this)) );
185 _change_connection = _db.changed_objects.connect([this](const vector<object_id_type>& ids) {
186 on_objects_changed(ids);
187 });
188 _removed_connection = _db.removed_objects.connect([this](const vector<const object*>& objs) {
189 on_objects_removed(objs);
190 });
191 _applied_block_connection = _db.applied_block.connect([this](const signed_block&){ on_applied_block(); });
192
193 _pending_trx_connection = _db.on_pending_transaction.connect([this](const signed_transaction& trx ){
194 if( _pending_trx_callback ) _pending_trx_callback( fc::variant(trx) );
195 });
196}
197
198database_api_impl::~database_api_impl()
199{

Callers

nothing calls this directly

Calls 2

variantClass · 0.85
connectMethod · 0.80

Tested by

no test coverage detected