| 128 | } |
| 129 | |
| 130 | void delayed_node_plugin::plugin_startup() |
| 131 | { |
| 132 | fc::async([this]() |
| 133 | { |
| 134 | mainloop(); |
| 135 | }); |
| 136 | |
| 137 | try |
| 138 | { |
| 139 | connect(); |
| 140 | my->database_api->set_block_applied_callback([this]( const fc::variant& block_id ) |
| 141 | { |
| 142 | fc::from_variant( block_id, my->last_received_remote_head ); |
| 143 | } ); |
| 144 | return; |
| 145 | } |
| 146 | catch (const fc::exception& e) |
| 147 | { |
| 148 | elog("Error during connection: ${e}", ("e", e.to_detail_string())); |
| 149 | } |
| 150 | fc::async([this]{connection_failed();}); |
| 151 | } |
| 152 | |
| 153 | void delayed_node_plugin::connection_failed() |
| 154 | { |
nothing calls this directly
no test coverage detected