From 2810cbc3d95cf4f1e928b5e0b10272c29504ec72 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 11 Aug 2024 17:57:52 -0400 Subject: [PATCH] Work around current run-time fail due to allocator wraparound. --- src/parser.cpp | 2 +- src/protocols/protocol_block_in_31800.cpp | 6 +++--- src/settings.cpp | 2 +- test/settings.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index e46bbc57..c569e6c9 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -900,7 +900,7 @@ options_metadata parser::load_settings() THROWS ( "node.allocation_bytes", value(&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", diff --git a/src/protocols/protocol_block_in_31800.cpp b/src/protocols/protocol_block_in_31800.cpp index fb600b09..373b5308 100644 --- a/src/protocols/protocol_block_in_31800.cpp +++ b/src/protocols/protocol_block_in_31800.cpp @@ -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); diff --git a/src/settings.cpp b/src/settings.cpp index 8f8cfc8e..5c026bb8 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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 }, diff --git a/test/settings.cpp b/test/settings.cpp index 089177fa..b277b08a 100644 --- a/test/settings.cpp +++ b/test/settings.cpp @@ -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(30'000'000_u64)); - BOOST_REQUIRE_EQUAL(node.allocation_bytes, 30'000'000_u64); + BOOST_REQUIRE_EQUAL(node.allocation(), system::limit(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);