Skip to content

Commit

Permalink
Work around current run-time fail due to allocator wraparound.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Aug 11, 2024
1 parent 85c957d commit 2810cbc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ options_metadata parser::load_settings() THROWS
(
"node.allocation_bytes",
value<uint64_t>(&configured.node.allocation_bytes),
"Preallocated block buffer for each network thread, defaults to 30'000'000."
"Preallocated block buffer for each network thread, defaults to 100'000'000."
)
(
"node.maximum_height",
Expand Down
6 changes: 3 additions & 3 deletions src/protocols/protocol_block_in_31800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ bool protocol_block_in_31800::handle_receive_block(const code& ec,
LOGP("Downloaded block [" << encode_hash(hash) << ":" << height
<< "] from [" << authority() << "].");

populate(block, link, height, BIND(complete, _1, block, height));
////notify(ec, chase::checked, height);
////fire(events::block_archived, height);
////populate(block, link, height, BIND(complete, _1, block, height));
notify(ec, chase::checked, height);
fire(events::block_archived, height);

count(size);
map_->erase(it);
Expand Down
2 changes: 1 addition & 1 deletion src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace node {
settings::settings() NOEXCEPT
: headers_first{ true },
allowed_deviation{ 1.5 },
allocation_bytes{ 30'000'000 },
allocation_bytes{ 1'000'000'000 },
snapshot_bytes{ 107'374'182'400 },
snapshot_valid{ 100'000 },
maximum_height{ 0 },
Expand Down
4 changes: 2 additions & 2 deletions test/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ BOOST_AUTO_TEST_CASE(settings__node__default_context__expected)
BOOST_REQUIRE_EQUAL(node.snapshot_valid, 100'000_u32);
BOOST_REQUIRE_EQUAL(node.maximum_height, 0_u32);

BOOST_REQUIRE_EQUAL(node.allocation(), system::limit<size_t>(30'000'000_u64));
BOOST_REQUIRE_EQUAL(node.allocation_bytes, 30'000'000_u64);
BOOST_REQUIRE_EQUAL(node.allocation(), system::limit<size_t>(1'000'000'000_u64));
BOOST_REQUIRE_EQUAL(node.allocation_bytes, 1'000'000'000_u64);

BOOST_REQUIRE_EQUAL(node.maximum_height_(), max_size_t);
BOOST_REQUIRE_EQUAL(node.maximum_concurrency, 50000_u32);
Expand Down

0 comments on commit 2810cbc

Please sign in to comment.