Adapted to fc promise changes
This commit is contained in:
parent
784221986a
commit
7eb3729cc0
6 changed files with 10 additions and 9 deletions
|
|
@ -192,8 +192,8 @@ namespace graphene { namespace app {
|
||||||
{
|
{
|
||||||
_app.chain_database()->check_tansaction_for_duplicated_operations(trx);
|
_app.chain_database()->check_tansaction_for_duplicated_operations(trx);
|
||||||
|
|
||||||
fc::promise<fc::variant>::ptr prom( new fc::promise<fc::variant>() );
|
fc::promise<fc::variant>::ptr prom = fc::promise<fc::variant>::create();
|
||||||
broadcast_transaction_with_callback( [=]( const fc::variant& v ){
|
broadcast_transaction_with_callback( [prom]( const fc::variant& v ){
|
||||||
prom->set_value(v);
|
prom->set_value(v);
|
||||||
}, trx );
|
}, trx );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -948,7 +948,7 @@ namespace graphene { namespace net { namespace detail {
|
||||||
#if 0
|
#if 0
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_retrigger_connect_loop_promise = fc::promise<void>::ptr( new fc::promise<void>("graphene::net::retrigger_connect_loop") );
|
_retrigger_connect_loop_promise = fc::promise<void>::create("graphene::net::retrigger_connect_loop");
|
||||||
if( is_wanting_new_connections() || !_add_once_node_list.empty() )
|
if( is_wanting_new_connections() || !_add_once_node_list.empty() )
|
||||||
{
|
{
|
||||||
if( is_wanting_new_connections() )
|
if( is_wanting_new_connections() )
|
||||||
|
|
@ -1078,7 +1078,7 @@ namespace graphene { namespace net { namespace detail {
|
||||||
if( !_sync_items_to_fetch_updated )
|
if( !_sync_items_to_fetch_updated )
|
||||||
{
|
{
|
||||||
dlog( "no sync items to fetch right now, going to sleep" );
|
dlog( "no sync items to fetch right now, going to sleep" );
|
||||||
_retrigger_fetch_sync_items_loop_promise = fc::promise<void>::ptr( new fc::promise<void>("graphene::net::retrigger_fetch_sync_items_loop") );
|
_retrigger_fetch_sync_items_loop_promise = fc::promise<void>::create("graphene::net::retrigger_fetch_sync_items_loop");
|
||||||
_retrigger_fetch_sync_items_loop_promise->wait();
|
_retrigger_fetch_sync_items_loop_promise->wait();
|
||||||
_retrigger_fetch_sync_items_loop_promise.reset();
|
_retrigger_fetch_sync_items_loop_promise.reset();
|
||||||
}
|
}
|
||||||
|
|
@ -1205,7 +1205,7 @@ namespace graphene { namespace net { namespace detail {
|
||||||
|
|
||||||
if (!_items_to_fetch_updated)
|
if (!_items_to_fetch_updated)
|
||||||
{
|
{
|
||||||
_retrigger_fetch_item_loop_promise = fc::promise<void>::ptr(new fc::promise<void>("graphene::net::retrigger_fetch_item_loop"));
|
_retrigger_fetch_item_loop_promise = fc::promise<void>::create("graphene::net::retrigger_fetch_item_loop");
|
||||||
fc::microseconds time_until_retrigger = fc::microseconds::maximum();
|
fc::microseconds time_until_retrigger = fc::microseconds::maximum();
|
||||||
if (next_peer_unblocked_time != fc::time_point::maximum())
|
if (next_peer_unblocked_time != fc::time_point::maximum())
|
||||||
time_until_retrigger = next_peer_unblocked_time - fc::time_point::now();
|
time_until_retrigger = next_peer_unblocked_time - fc::time_point::now();
|
||||||
|
|
@ -1297,7 +1297,7 @@ namespace graphene { namespace net { namespace detail {
|
||||||
|
|
||||||
if (_new_inventory.empty())
|
if (_new_inventory.empty())
|
||||||
{
|
{
|
||||||
_retrigger_advertise_inventory_loop_promise = fc::promise<void>::ptr(new fc::promise<void>("graphene::net::retrigger_advertise_inventory_loop"));
|
_retrigger_advertise_inventory_loop_promise = fc::promise<void>::create("graphene::net::retrigger_advertise_inventory_loop");
|
||||||
_retrigger_advertise_inventory_loop_promise->wait();
|
_retrigger_advertise_inventory_loop_promise->wait();
|
||||||
_retrigger_advertise_inventory_loop_promise.reset();
|
_retrigger_advertise_inventory_loop_promise.reset();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ int main( int argc, char** argv )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fc::promise<int>::ptr exit_promise = new fc::promise<int>("UNIX Signal Handler");
|
fc::promise<int>::ptr exit_promise = fc::promise<int>::create("UNIX Signal Handler");
|
||||||
fc::set_signal_handler([&exit_promise](int signal) {
|
fc::set_signal_handler([&exit_promise](int signal) {
|
||||||
exit_promise->set_value(signal);
|
exit_promise->set_value(signal);
|
||||||
}, SIGINT);
|
}, SIGINT);
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ int main(int argc, char** argv) {
|
||||||
node.startup();
|
node.startup();
|
||||||
node.startup_plugins();
|
node.startup_plugins();
|
||||||
|
|
||||||
fc::promise<int>::ptr exit_promise = new fc::promise<int>("UNIX Signal Handler");
|
fc::promise<int>::ptr exit_promise = fc::promise<int>::create("UNIX Signal Handler");
|
||||||
fc::set_signal_handler([&exit_promise](int signal) {
|
fc::set_signal_handler([&exit_promise](int signal) {
|
||||||
exit_promise->set_value(signal);
|
exit_promise->set_value(signal);
|
||||||
}, SIGINT);
|
}, SIGINT);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fc/io/json.hpp>
|
#include <fc/io/json.hpp>
|
||||||
|
#include <fc/io/raw.hpp>
|
||||||
#include <fc/variant.hpp>
|
#include <fc/variant.hpp>
|
||||||
#include <fc/variant_object.hpp>
|
#include <fc/variant_object.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ int main(int argc, char** argv) {
|
||||||
node->startup();
|
node->startup();
|
||||||
node->startup_plugins();
|
node->startup_plugins();
|
||||||
|
|
||||||
fc::promise<int>::ptr exit_promise = new fc::promise<int>("UNIX Signal Handler");
|
fc::promise<int>::ptr exit_promise = fc::promise<int>::create("UNIX Signal Handler");
|
||||||
|
|
||||||
fc::set_signal_handler([&exit_promise](int signal) {
|
fc::set_signal_handler([&exit_promise](int signal) {
|
||||||
elog( "Caught SIGINT attempting to exit cleanly" );
|
elog( "Caught SIGINT attempting to exit cleanly" );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue