| 180 | database_api::~database_api() {} |
| 181 | |
| 182 | database_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 | |
| 198 | database_api_impl::~database_api_impl() |
| 199 | { |