BitShares-Core  5.2.1
BitShares blockchain implementation and command-line interface software
Public Member Functions | List of all members
graphene::api_helper_indexes::asset_in_liquidity_pools_index Class Reference

This secondary index maintains a map to make it easier to find liquidity pools by any asset in the pool. More...

#include <api_helper_indexes.hpp>

Inheritance diagram for graphene::api_helper_indexes::asset_in_liquidity_pools_index:
graphene::db::secondary_index

Public Member Functions

void object_inserted (const object &obj) override
 
void object_removed (const object &obj) override
 
void about_to_modify (const object &before) override
 
void object_modified (const object &after) override
 
const flat_set< liquidity_pool_id_type > & get_liquidity_pools_by_asset (const asset_id_type &a) const
 
- Public Member Functions inherited from graphene::db::secondary_index
virtual ~secondary_index ()
 
virtual void object_inserted (const object &obj)
 
virtual void object_removed (const object &obj)
 
virtual void about_to_modify (const object &before)
 
virtual void object_modified (const object &after)
 

Detailed Description

This secondary index maintains a map to make it easier to find liquidity pools by any asset in the pool.

Note
This is implemented with flat_map and flat_set considering there aren't too many liquidity pools in the system thus the performance would be acceptable.

Definition at line 59 of file api_helper_indexes.hpp.

Member Function Documentation

void graphene::api_helper_indexes::asset_in_liquidity_pools_index::about_to_modify ( const object &  before)
override

Definition at line 111 of file api_helper_indexes.cpp.

const flat_set< liquidity_pool_id_type > & graphene::api_helper_indexes::asset_in_liquidity_pools_index::get_liquidity_pools_by_asset ( const asset_id_type &  a) const

Definition at line 121 of file api_helper_indexes.cpp.

void graphene::api_helper_indexes::asset_in_liquidity_pools_index::object_inserted ( const object &  obj)
override

Definition at line 96 of file api_helper_indexes.cpp.

void graphene::api_helper_indexes::asset_in_liquidity_pools_index::object_modified ( const object &  after)
override

Definition at line 116 of file api_helper_indexes.cpp.

void graphene::api_helper_indexes::asset_in_liquidity_pools_index::object_removed ( const object &  obj)
override

Definition at line 103 of file api_helper_indexes.cpp.


The documentation for this class was generated from the following files: