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

Method enable_api

libraries/app/api.cpp:72–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71
72 void login_api::enable_api( const std::string& api_name )
73 {
74 if( api_name == "database_api" )
75 {
76 _database_api = std::make_shared< database_api >( std::ref( *_app.chain_database() ) );
77 }
78 else if( api_name == "network_broadcast_api" )
79 {
80 _network_broadcast_api = std::make_shared< network_broadcast_api >( std::ref( _app ) );
81 }
82 else if( api_name == "history_api" )
83 {
84 _history_api = std::make_shared< history_api >( _app );
85 }
86 else if( api_name == "network_node_api" )
87 {
88 _network_node_api = std::make_shared< network_node_api >( std::ref(_app) );
89 }
90 return;
91 }
92
93 network_broadcast_api::network_broadcast_api(application& a):_app(a)
94 {

Callers

nothing calls this directly

Calls 1

chain_databaseMethod · 0.80

Tested by

no test coverage detected