diff --git a/nano/core_test/bootstrap.cpp b/nano/core_test/bootstrap.cpp index e17867c101..1beb10835a 100644 --- a/nano/core_test/bootstrap.cpp +++ b/nano/core_test/bootstrap.cpp @@ -1536,19 +1536,18 @@ TEST (frontier_req, confirmed_frontier) { nano::system system (1); auto node1 = system.nodes[0]; - nano::raw_key priv_key; + nano::keypair key_before_genesis; // Public key before genesis in accounts table - while (nano::pub_key (priv_key).number () >= nano::dev::genesis_key.pub.number ()) + while (key_before_genesis.pub.number () >= nano::dev::genesis_key.pub.number ()) { - priv_key = nano::keypair ().prv; + key_before_genesis = nano::keypair (); } - nano::keypair key_before_genesis (priv_key.to_string ()); + nano::keypair key_after_genesis; // Public key after genesis in accounts table - while (nano::pub_key (priv_key).number () <= nano::dev::genesis_key.pub.number ()) + while (key_after_genesis.pub.number () <= nano::dev::genesis_key.pub.number ()) { - priv_key = nano::keypair ().prv; + key_after_genesis = nano::keypair (); } - nano::keypair key_after_genesis (priv_key.to_string ()); nano::state_block_builder builder; auto send1 = builder diff --git a/nano/core_test/uint256_union.cpp b/nano/core_test/uint256_union.cpp index bde76e3da5..89300e16bb 100644 --- a/nano/core_test/uint256_union.cpp +++ b/nano/core_test/uint256_union.cpp @@ -1,8 +1,11 @@ +#include #include #include #include +#include + namespace { template @@ -567,3 +570,19 @@ void check_operator_greater_than (Num lhs, Num rhs) ASSERT_FALSE (rhs > rhs); } } + +TEST (random_pool, multithreading) +{ + std::vector threads; + for (auto i = 0; i < 100; ++i) + { + threads.emplace_back ([] () { + nano::uint256_union number; + nano::random_pool::generate_block (number.bytes.data (), number.bytes.size ()); + }); + } + for (auto & i : threads) + { + i.join (); + } +} diff --git a/tsan_suppressions b/tsan_suppressions index 85f74e588b..e08006cef7 100644 --- a/tsan_suppressions +++ b/tsan_suppressions @@ -1,2 +1,4 @@ race:mdb.c race:rocksdb +race:Rijndael::Base::FillEncTable +race:Rijndael::Base::FillDecTable