Graphene Updates and DApp Support #643

Closed
nathanielhourt wants to merge 84 commits from dapp-support into develop
6 changed files with 10 additions and 9 deletions
Showing only changes of commit 7eb3729cc0 - Show all commits

View file

@ -192,8 +192,8 @@ namespace graphene { namespace app {
{
_app.chain_database()->check_tansaction_for_duplicated_operations(trx);
fc::promise<fc::variant>::ptr prom( new fc::promise<fc::variant>() );
broadcast_transaction_with_callback( [=]( const fc::variant& v ){
fc::promise<fc::variant>::ptr prom = fc::promise<fc::variant>::create();
broadcast_transaction_with_callback( [prom]( const fc::variant& v ){
prom->set_value(v);
}, trx );

View file

@ -948,7 +948,7 @@ namespace graphene { namespace net { namespace detail {
#if 0
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() )
@ -1078,7 +1078,7 @@ namespace graphene { namespace net { namespace detail {
if( !_sync_items_to_fetch_updated )
{
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.reset();
}
@ -1205,7 +1205,7 @@ namespace graphene { namespace net { namespace detail {
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();
if (next_peer_unblocked_time != fc::time_point::maximum())
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())
{
_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.reset();
}

View file

@ -266,7 +266,7 @@ int main( int argc, char** argv )
}
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) {
exit_promise->set_value(signal);
}, SIGINT);

View file

@ -166,7 +166,7 @@ int main(int argc, char** argv) {
node.startup();
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) {
exit_promise->set_value(signal);
}, SIGINT);

View file

@ -23,6 +23,7 @@
*/
#include <fc/io/json.hpp>
#include <fc/io/raw.hpp>
#include <fc/variant.hpp>
#include <fc/variant_object.hpp>

View file

@ -136,7 +136,7 @@ int main(int argc, char** argv) {
node->startup();
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) {
elog( "Caught SIGINT attempting to exit cleanly" );