Skip to content

Commit 7811690

Browse files
committed
Rename priority setting, fix test.
1 parent 477f903 commit 7811690

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

include/bitcoin/node/settings.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class BCN_API settings
7272
settings(system::chain::selection context) NOEXCEPT;
7373

7474
/// Properties.
75+
bool priority;
7576
bool headers_first;
76-
bool priority_validation;
7777
float allowed_deviation;
7878
uint16_t allocation_multiple;
7979
uint64_t snapshot_bytes;

src/parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,8 @@ options_metadata parser::load_settings() THROWS
906906
"The number of threads in the validation threadpool, defaults to 16."
907907
)
908908
(
909-
"node.priority_validation",
910-
value<bool>(&configured.node.priority_validation),
909+
"node.priority",
910+
value<bool>(&configured.node.priority),
911911
"Set the validation threadpool to high priority, defaults to true."
912912
)
913913
(

src/settings.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ std::filesystem::path settings::events_file() const NOEXCEPT
7575
namespace node {
7676

7777
settings::settings() NOEXCEPT
78-
: headers_first{ true },
79-
priority_validation{ true },
78+
: priority{ true },
79+
headers_first{ true },
8080
allowed_deviation{ 1.5 },
8181
allocation_multiple{ 20 },
8282
snapshot_bytes{ 200'000'000'000 },
@@ -123,7 +123,7 @@ network::wall_clock::duration settings::currency_window() const NOEXCEPT
123123

124124
network::thread_priority settings::priority_() const NOEXCEPT
125125
{
126-
return priority_validation ? network::thread_priority::high :
126+
return priority ? network::thread_priority::high :
127127
network::thread_priority::normal;
128128
}
129129

test/settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ BOOST_AUTO_TEST_CASE(settings__node__default_context__expected)
5454
using namespace network;
5555

5656
const node::settings node{};
57+
BOOST_REQUIRE_EQUAL(node.priority, true);
5758
BOOST_REQUIRE_EQUAL(node.headers_first, true);
58-
BOOST_REQUIRE_EQUAL(node.priority_validation, true);
5959
BOOST_REQUIRE_EQUAL(node.allowed_deviation, 1.5);
6060
BOOST_REQUIRE_EQUAL(node.maximum_height, 0_u32);
6161
BOOST_REQUIRE_EQUAL(node.allocation_multiple, 20_u16);
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(settings__node__default_context__expected)
7474
BOOST_REQUIRE_EQUAL(node.maximum_concurrency_(), 50'000_size);
7575
BOOST_REQUIRE(node.sample_period() == steady_clock::duration(seconds(10)));
7676
BOOST_REQUIRE(node.currency_window() == steady_clock::duration(minutes(60)));
77-
BOOST_REQUIRE(node.priority_() == network::thread_priority::normal);
77+
BOOST_REQUIRE(node.priority_() == network::thread_priority::high);
7878
}
7979

8080
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)