Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GRPH-73] fix block id forks #110

Merged
merged 3 commits into from
Sep 17, 2019
Merged

Conversation

Noughmad
Copy link

@Noughmad Noughmad commented Sep 4, 2019

Store correct block ID when switching forks

Store correct block ID when switching forks
@bobinson
Copy link

bobinson commented Sep 5, 2019

Reference bithsares PR: bitshares/bitshares-core#938

@bobinson bobinson added the fork-handling various fixes to handle forks label Sep 8, 2019
@oxarbitrage
Copy link

The develop branch seems to be not building, seems unrelated to this pull request but we need to find where the problem was introduced:

oxarbitrage@oxarbitrage-Lenovo-ideapad-320S-14IKB:~/CLionProjects/pp_pull110/peerplays$ make
[  2%] Built target project_secp256k1
[ 26%] Built target fc
[ 27%] Built target log_test
[ 27%] Built target ecc_test
[ 28%] Built target api
[ 29%] Built target blind
[ 30%] Built target real128_test
[ 30%] Built target bip_lock
[ 34%] Built target all_tests
[ 34%] Built target hmac_test
[ 35%] Built target task_cancel_test
[ 36%] Built target bloom_test
[ 37%] Built target graphene_db
[ 38%] Built target cat-parts
File "/home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/chain/include/graphene/chain/hardfork.hpp" up-to-date with .d directory
[ 38%] Built target build_hardfork_hpp
[ 59%] Built target graphene_chain
[ 61%] Built target graphene_utilities
[ 63%] Built target graphene_net
[ 64%] Built target graphene_time
[ 65%] Built target graphene_debug_witness
[ 66%] Built target graphene_bookie
[ 67%] Built target graphene_market_history
[ 68%] Built target graphene_affiliate_stats
[ 68%] Built target graphene_accounts_list
[ 69%] Built target graphene_account_history
[ 69%] Building CXX object libraries/app/CMakeFiles/graphene_app.dir/application.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
                 from /usr/include/c++/7/bits/allocator.h:46,
                 from /usr/include/c++/7/string:41,
                 from /usr/include/c++/7/stdexcept:39,
                 from /home/oxarbitrage/opt/boost_1_67_0/include/boost/container/throw_exception.hpp:26,
                 from /home/oxarbitrage/opt/boost_1_67_0/include/boost/container/new_allocator.hpp:24,
                 from /home/oxarbitrage/opt/boost_1_67_0/include/boost/container/flat_map.hpp:26,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/fc/include/fc/container/flat_fwd.hpp:2,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/chain/include/graphene/chain/protocol/types.hpp:25,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/chain/include/graphene/chain/protocol/base.hpp:26,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/chain/include/graphene/chain/protocol/operations.hpp:25,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/chain/include/graphene/chain/account_object.hpp:25,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/app/include/graphene/app/full_account.hpp:26,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/app/include/graphene/app/database_api.hpp:26,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/app/include/graphene/app/api.hpp:26,
                 from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/app/application.cpp:24:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = fc::rpc::websocket_api_connection; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}; _Tp = fc::rpc::websocket_api_connection]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4:   required from ‘static void std::allocator_traits<std::allocator<T> >::construct(std::allocator_traits<std::allocator<T> >::allocator_type&, _Up*, _Args&& ...) [with _Up = fc::rpc::websocket_api_connection; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}; _Tp = fc::rpc::websocket_api_connection; std::allocator_traits<std::allocator<T> >::allocator_type = std::allocator<fc::rpc::websocket_api_connection>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39:   required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {const std::shared_ptr<fc::http::websocket_connection>&}; _Tp = fc::rpc::websocket_api_connection; _Alloc = std::allocator<fc::rpc::websocket_api_connection>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4:   required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = fc::rpc::websocket_api_connection; _Alloc = std::allocator<fc::rpc::websocket_api_connection>; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<fc::rpc::websocket_api_connection>; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}; _Tp = fc::rpc::websocket_api_connection; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<fc::rpc::websocket_api_connection>; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}; _Tp = fc::rpc::websocket_api_connection]’
/usr/include/c++/7/bits/shared_ptr.h:690:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = fc::rpc::websocket_api_connection; _Alloc = std::allocator<fc::rpc::websocket_api_connection>; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = fc::rpc::websocket_api_connection; _Args = {const std::shared_ptr<fc::http::websocket_connection>&}]’
/home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/app/application.cpp:229:74:   required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: no matching function for call to ‘fc::rpc::websocket_api_connection::websocket_api_connection(const std::shared_ptr<fc::http::websocket_connection>&)’
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/app/application.cpp:44:0:
/home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/fc/include/fc/rpc/websocket_api.hpp:13:10: note: candidate: fc::rpc::websocket_api_connection::websocket_api_connection(fc::http::websocket_connection&)
          websocket_api_connection( fc::http::websocket_connection& c );
          ^~~~~~~~~~~~~~~~~~~~~~~~
/home/oxarbitrage/CLionProjects/pp_pull110/peerplays/libraries/fc/include/fc/rpc/websocket_api.hpp:13:10: note:   no known conversion for argument 1 from ‘const std::shared_ptr<fc::http::websocket_connection>’ to ‘fc::http::websocket_connection&’
cc1plus: warning: unrecognized command line option ‘-Wno-class-memaccess’
libraries/app/CMakeFiles/graphene_app.dir/build.make:86: recipe for target 'libraries/app/CMakeFiles/graphene_app.dir/application.cpp.o' failed
make[2]: *** [libraries/app/CMakeFiles/graphene_app.dir/application.cpp.o] Error 1
CMakeFiles/Makefile2:1188: recipe for target 'libraries/app/CMakeFiles/graphene_app.dir/all' failed
make[1]: *** [libraries/app/CMakeFiles/graphene_app.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
oxarbitrage@oxarbitrage-Lenovo-ideapad-320S-14IKB:~/CLionProjects/pp_pull110/peerplays$

This is why i am asking for travis or similar solution, so we can find these without building each pull request locally.

@oxarbitrage
Copy link

I am not totally sure but could be related to #107

@Noughmad
Copy link
Author

This is why i am asking for travis or similar solution, so we can find these without building each pull request locally.

A big +1 from me for some CI. Compiling already takes a long time, so some automation would be welcome.

Copy link

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @Noughmad

@oxarbitrage oxarbitrage merged commit 19a9641 into develop Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fork-handling various fixes to handle forks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants