Page MenuHomePhabricator

[avalanche] Move code around in the peer manager
ClosedPublic

Authored by deadalnix on Jul 7 2021, 23:52.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC69125012b6ac: [avalanche] Move code around in the peer manager
Summary

It's a total mess in there. For some reason, the orphan pool is in between teh slots and teh peer set, and so on. Order don't match int he implementation and header.

Test Plan
ninja all check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tail of the build log:

In file included from ../../src/avalanche/peermanager.cpp:5:
../../src/./avalanche/peermanager.h:145:44: error: private field 'm_unbroadcast_proofids' is not used [-Werror,-Wunused-private-field]
    std::set<ProofId, SaltedProofIdHasher> m_unbroadcast_proofids;
                                           ^
10 errors generated.
[387/508] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
FAILED: src/CMakeFiles/server.dir/init.cpp.o 
/usr/bin/ccache /usr/bin/clang++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wgnu -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety -Wrange-loop-analysis -Wredundant-decls -Wunreachable-code-loop-increment -Wsign-compare -Wconditional-uninitialized -Wformat-security -Wredundant-move -Wshadow -Wshadow-field -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/init.cpp.o -MF src/CMakeFiles/server.dir/init.cpp.o.d -o src/CMakeFiles/server.dir/init.cpp.o -c ../../src/init.cpp
In file included from ../../src/init.cpp:10:
In file included from ../../src/./init.h:10:
In file included from ../../src/./util/system.h:24:
In file included from ../../src/./util/settings.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map:60:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h:452:7: error: static_assert failed due to requirement 'std::__is_invocable<avalanche::SaltedProofIdHasher &, const avalanche::ProofId &, const avalanche::ProofId &>{}' "comparison object must be invocable with two arguments of key type"
      static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:133:17: note: in instantiation of template class 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >' requested here
      _Rep_type _M_t;  // Red-black tree representing set.
                ^
../../src/./avalanche/peermanager.h:145:44: note: in instantiation of template class 'std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >' requested here
    std::set<ProofId, SaltedProofIdHasher> m_unbroadcast_proofids;
                                           ^
In file included from ../../src/init.cpp:10:
In file included from ../../src/./init.h:10:
In file included from ../../src/./util/system.h:34:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/set:61:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:147:35: error: no type named 'const_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_iterator         iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
../../src/./avalanche/peermanager.h:145:44: note: in instantiation of template class 'std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >' requested here
    std::set<ProofId, SaltedProofIdHasher> m_unbroadcast_proofids;
                                           ^
In file included from ../../src/init.cpp:10:
In file included from ../../src/./init.h:10:
In file included from ../../src/./util/system.h:34:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/set:61:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:148:35: error: no type named 'const_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_iterator         const_iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:149:35: error: no type named 'const_reverse_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:150:35: error: no type named 'const_reverse_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:151:35: error: no type named 'size_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::size_type              size_type;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:152:35: error: no type named 'difference_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::difference_type        difference_type;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:156:45: error: no type named 'node_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      using node_type = typename _Rep_type::node_type;
                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:157:54: error: no type named 'insert_return_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      using insert_return_type = typename _Rep_type::insert_return_type;
                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
9 errors generated.
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[385/508] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./net_types.h:8,
                 from ../../src/./addrdb.h:10,
                 from ../../src/./net.h:10,
                 from ../../src/./invrequest.h:8,
                 from ../../src/./net_processing.h:10,
                 from ../../src/net_processing.cpp:6:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[386/508] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./serialize.h:19,
                 from ../../src/./amount.h:10,
                 from ../../src/./validation.h:14,
                 from ../../src/validation.cpp:7:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[387/508] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
FAILED: src/CMakeFiles/server.dir/init.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/init.cpp.o -MF src/CMakeFiles/server.dir/init.cpp.o.d -o src/CMakeFiles/server.dir/init.cpp.o -c ../../src/init.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./util/settings.h:10,
                 from ../../src/./util/system.h:24,
                 from ../../src/./init.h:10,
                 from ../../src/init.cpp:10:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Tail of the build log:

       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[363/455] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./net_types.h:8,
                 from ../../src/./addrdb.h:10,
                 from ../../src/./net.h:10,
                 from ../../src/./invrequest.h:8,
                 from ../../src/./net_processing.h:10,
                 from ../../src/net_processing.cpp:6:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[364/455] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./serialize.h:19,
                 from ../../src/./amount.h:10,
                 from ../../src/./validation.h:14,
                 from ../../src/validation.cpp:7:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[365/455] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
FAILED: src/CMakeFiles/server.dir/init.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/init.cpp.o -MF src/CMakeFiles/server.dir/init.cpp.o.d -o src/CMakeFiles/server.dir/init.cpp.o -c ../../src/init.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./util/settings.h:10,
                 from ../../src/./util/system.h:24,
                 from ../../src/./init.h:10,
                 from ../../src/init.cpp:10:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

[337/508] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[338/508] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[339/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[340/508] Linking C static library src/secp256k1/libsecp256k1.a
[341/508] Linking CXX static library src/libbitcoinconsensus.a
[342/508] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[343/508] Linking C executable src/secp256k1/ecmult-bench
[344/508] Linking C executable src/secp256k1/internal-bench
[345/508] Linking C executable src/secp256k1/sign-bench
[346/508] Linking C executable src/secp256k1/verify-bench
[347/508] Linking C executable src/secp256k1/recover-bench
[348/508] Installing component secp256k1
-- Install configuration: "Debug"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[349/508] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[350/508] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[351/508] Linking CXX static library src/libscript.a
[352/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[353/508] Linking CXX static library src/libcommon.a
[354/508] Linking CXX shared library src/libbitcoinconsensus.so.0.23.8
[355/508] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[356/508] Linking CXX executable src/bitcoin-cli
[357/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[358/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[359/508] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[360/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[361/508] Linking CXX executable src/bitcoin-tx
[362/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[363/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[364/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[365/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[366/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[367/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[368/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[369/508] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[370/508] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[371/508] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[372/508] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[373/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[374/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[375/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[376/508] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[377/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[378/508] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[379/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[380/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[381/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[382/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[383/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[384/508] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[385/508] Linking CXX static library src/wallet/libwallet.a
[386/508] Linking CXX static library src/wallet/libwallet-tool.a
[387/508] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[329/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/uint256.cpp.o
[330/506] Building CXX object src/CMakeFiles/util.dir/blockdb.cpp.o
[331/506] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[332/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[333/506] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[334/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[335/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[336/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[337/506] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[338/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[339/506] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[340/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[341/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[342/506] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[343/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[344/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[345/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[346/506] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[347/506] Linking CXX static library src/libutil.a
[348/506] Linking CXX static library src/librpcclient.a
[349/506] Linking CXX static library src/libbitcoinconsensus.a
[350/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[351/506] Linking CXX static library src/libscript.a
[352/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[353/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[354/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[355/506] Linking CXX static library src/libcommon.a
[356/506] Linking CXX shared library src/libbitcoinconsensus.so.0.23.8
[357/506] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[358/506] Linking CXX executable src/bitcoin-cli
[359/506] Linking CXX executable src/bitcoin-tx
[360/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[361/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[362/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[363/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[364/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[365/506] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[366/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[367/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[368/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[369/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[370/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[371/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[372/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[373/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[374/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[375/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[376/506] Linking CXX static library src/zmq/libzmq.a
[377/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[378/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[379/506] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[380/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[381/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[382/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[383/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[384/506] Linking CXX static library src/wallet/libwallet.a
[385/506] Linking CXX static library src/wallet/libwallet-tool.a
[386/506] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Fix mismatch between unordered and ordered sets.

The mempool use an ordered set, so I think we are good with that.

Tail of the build log:

                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:157:54: error: no type named 'insert_return_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      using insert_return_type = typename _Rep_type::insert_return_type;
                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
9 errors generated.
[387/508] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
FAILED: src/CMakeFiles/server.dir/init.cpp.o 
/usr/bin/ccache /usr/bin/clang++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wgnu -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety -Wrange-loop-analysis -Wredundant-decls -Wunreachable-code-loop-increment -Wsign-compare -Wconditional-uninitialized -Wformat-security -Wredundant-move -Wshadow -Wshadow-field -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/init.cpp.o -MF src/CMakeFiles/server.dir/init.cpp.o.d -o src/CMakeFiles/server.dir/init.cpp.o -c ../../src/init.cpp
In file included from ../../src/init.cpp:10:
In file included from ../../src/./init.h:10:
In file included from ../../src/./util/system.h:24:
In file included from ../../src/./util/settings.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/map:60:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h:452:7: error: static_assert failed due to requirement 'std::__is_invocable<avalanche::SaltedProofIdHasher &, const avalanche::ProofId &, const avalanche::ProofId &>{}' "comparison object must be invocable with two arguments of key type"
      static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:133:17: note: in instantiation of template class 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >' requested here
      _Rep_type _M_t;  // Red-black tree representing set.
                ^
../../src/./avalanche/peermanager.h:145:44: note: in instantiation of template class 'std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >' requested here
    std::set<ProofId, SaltedProofIdHasher> m_unbroadcast_proofids;
                                           ^
In file included from ../../src/init.cpp:10:
In file included from ../../src/./init.h:10:
In file included from ../../src/./util/system.h:34:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/set:61:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:147:35: error: no type named 'const_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_iterator         iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
../../src/./avalanche/peermanager.h:145:44: note: in instantiation of template class 'std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >' requested here
    std::set<ProofId, SaltedProofIdHasher> m_unbroadcast_proofids;
                                           ^
In file included from ../../src/init.cpp:10:
In file included from ../../src/./init.h:10:
In file included from ../../src/./util/system.h:34:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/set:61:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:148:35: error: no type named 'const_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_iterator         const_iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:149:35: error: no type named 'const_reverse_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:150:35: error: no type named 'const_reverse_iterator' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:151:35: error: no type named 'size_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::size_type              size_type;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:152:35: error: no type named 'difference_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      typedef typename _Rep_type::difference_type        difference_type;
              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:156:45: error: no type named 'node_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      using node_type = typename _Rep_type::node_type;
                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_set.h:157:54: error: no type named 'insert_return_type' in 'std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >'
      using insert_return_type = typename _Rep_type::insert_return_type;
                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
9 errors generated.
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[385/508] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DABORT_ON_FAILED_ASSUME -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DDEBUG -DDEBUG_LOCKORDER -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -O0 -fPIC -fvisibility=hidden   -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./serialize.h:19,
                 from ../../src/./amount.h:10,
                 from ../../src/./validation.h:14,
                 from ../../src/validation.cpp:7:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[386/508] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DABORT_ON_FAILED_ASSUME -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DDEBUG -DDEBUG_LOCKORDER -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -O0 -fPIC -fvisibility=hidden   -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./net_types.h:8,
                 from ../../src/./addrdb.h:10,
                 from ../../src/./net.h:10,
                 from ../../src/./invrequest.h:8,
                 from ../../src/./net_processing.h:10,
                 from ../../src/net_processing.cpp:6:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[387/508] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
FAILED: src/CMakeFiles/server.dir/init.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DABORT_ON_FAILED_ASSUME -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DDEBUG -DDEBUG_LOCKORDER -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -O0 -fPIC -fvisibility=hidden   -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/init.cpp.o -MF src/CMakeFiles/server.dir/init.cpp.o.d -o src/CMakeFiles/server.dir/init.cpp.o -c ../../src/init.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./util/settings.h:10,
                 from ../../src/./util/system.h:24,
                 from ../../src/./init.h:10,
                 from ../../src/init.cpp:10:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[324/455] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[325/455] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[326/455] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[327/455] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[328/455] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[329/455] Building CXX object src/CMakeFiles/server.dir/rpc/misc.cpp.o
[330/455] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[331/455] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[332/455] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[333/455] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
In file included from /usr/include/c++/8/map:60,
                 from ../../src/./serialize.h:19,
                 from ../../src/./amount.h:10,
                 from ../../src/./validation.h:14,
                 from ../../src/validation.cpp:7:
/usr/include/c++/8/bits/stl_tree.h: In instantiation of ‘class std::_Rb_tree<avalanche::ProofId, avalanche::ProofId, std::_Identity<avalanche::ProofId>, avalanche::SaltedProofIdHasher, std::allocator<avalanche::ProofId> >’:
/usr/include/c++/8/bits/stl_set.h:133:17:   required from ‘class std::set<avalanche::ProofId, avalanche::SaltedProofIdHasher>’
../../src/./avalanche/peermanager.h:145:44:   required from here
/usr/include/c++/8/bits/stl_tree.h:452:21: error: static assertion failed: comparison object must be invocable with two arguments of key type
       static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_tree.h:457:21: error: static assertion failed: comparison object must be invocable as const
       static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[334/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[335/455] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[336/455] Linking C static library src/secp256k1/libsecp256k1.a
[337/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[338/455] Linking C executable src/secp256k1/ecmult-bench
[339/455] Linking C executable src/secp256k1/internal-bench
[340/455] Linking C executable src/secp256k1/sign-bench
[341/455] Linking C executable src/secp256k1/verify-bench
[342/455] Linking C executable src/secp256k1/recover-bench
[343/455] Linking CXX static library src/libcommon.a
[344/455] Linking CXX static library src/libscript.a
[345/455] Linking CXX static library src/libbitcoinconsensus.a
[346/455] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[347/455] Linking CXX shared library src/libbitcoinconsensus.so.0.23.8
[348/455] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[349/455] Linking CXX executable src/bitcoin-cli
[350/455] Linking CXX executable src/bitcoin-tx
[351/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[352/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[353/455] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[354/455] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[355/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[356/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[357/455] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[358/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[359/455] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[360/455] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[361/455] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[362/455] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[363/455] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[364/455] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[365/455] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

[329/506] Linking C executable src/secp256k1/recover-bench
[330/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/uint256.cpp.o
[331/506] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[332/506] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[333/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[334/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[335/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[336/506] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[337/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[338/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[339/506] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[340/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[341/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[342/506] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[343/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[344/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[345/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[346/506] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[347/506] Linking CXX static library src/libutil.a
[348/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[349/506] Linking CXX static library src/librpcclient.a
[350/506] Linking CXX static library src/libbitcoinconsensus.a
[351/506] Linking CXX static library src/libscript.a
[352/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[353/506] Linking CXX static library src/libcommon.a
[354/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[355/506] Linking CXX shared library src/libbitcoinconsensus.so.0.23.8
[356/506] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[357/506] Linking CXX executable src/bitcoin-cli
[358/506] Linking CXX executable src/bitcoin-tx
[359/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[360/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[361/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[362/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[363/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[364/506] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[365/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[366/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[367/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[368/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[369/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[370/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[371/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[372/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[373/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[374/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[375/506] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[376/506] Linking CXX static library src/zmq/libzmq.a
[377/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[378/506] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[379/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[380/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[381/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[382/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[383/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[384/506] Linking CXX static library src/wallet/libwallet.a
[385/506] Linking CXX static library src/wallet/libwallet-tool.a
[386/506] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Get back to unordered_set XD

deadalnix retitled this revision from [avalanche] Move code aroudn in the peer manager to [avalanche] Move code around in the peer manager.Jul 8 2021, 00:20
This revision is now accepted and ready to land.Jul 8 2021, 08:07