diff --git a/src/settings.cpp b/src/settings.cpp index 61d31ad0..a901a3a0 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -39,7 +39,7 @@ settings::settings() NOEXCEPT provide_witness{ true }, require_witness{ true }, provide_filters{ false }, - provide_privacy{ false }, + provide_privacy{ true }, limited_blocks{ false }, use_gpu{ true }, cpu_batch_verify{ false }, diff --git a/test/functional/p2p.cpp b/test/functional/p2p.cpp index 7a153446..3a838fb6 100644 --- a/test/functional/p2p.cpp +++ b/test/functional/p2p.cpp @@ -205,11 +205,11 @@ struct p2p_compact_not_current_setup_fixture } }; -BC_AUTO_TEST_CASE(functional_p2p__handshake__default__provides_network_and_witness) +BC_AUTO_TEST_CASE(functional_p2p__handshake__default__provides_network_witness_and_encryption) { BC_REQUIRE(handshake()); BC_REQUIRE_EQUAL(node_version->value, config_.network.protocol_maximum); - BC_REQUIRE_EQUAL(node_version->services, service::node_network | service::node_witness); + BC_REQUIRE_EQUAL(node_version->services, service::node_network | service::node_witness | service::node_encrypted_transport); } BC_AUTO_TEST_CASE(functional_p2p__ping__nonce__pong_echo) diff --git a/test/functional/p2p_setup_fixture.cpp b/test/functional/p2p_setup_fixture.cpp index e16ae5f5..fc763340 100644 --- a/test/functional/p2p_setup_fixture.cpp +++ b/test/functional/p2p_setup_fixture.cpp @@ -54,9 +54,10 @@ configuration p2p_setup_fixture::configured(const configurator& configure) if (configure) configure(config); - // The store envelope is derived from the configured chain, as at startup. + // Derived values are computed from the configuration, as at startup. config.database.initialize(config.bitcoin, node_settings.limited_blocks, node_settings.silent_start_height); + BC_REQUIRE(!network_settings.initialize()); return config; } diff --git a/test/settings.cpp b/test/settings.cpp index 4cbab0ea..3376e888 100644 --- a/test/settings.cpp +++ b/test/settings.cpp @@ -40,7 +40,7 @@ BC_AUTO_TEST_CASE(settings__node__default_context__expected) BC_REQUIRE_EQUAL(node.provide_witness, true); BC_REQUIRE_EQUAL(node.require_witness, true); BC_REQUIRE_EQUAL(node.provide_filters, false); - BC_REQUIRE_EQUAL(node.provide_privacy, false); + BC_REQUIRE_EQUAL(node.provide_privacy, true); BC_REQUIRE_EQUAL(node.limited_blocks, false); BC_REQUIRE_EQUAL(node.use_gpu, true); BC_REQUIRE_EQUAL(node.cpu_batch_verify, false); @@ -130,17 +130,23 @@ BC_AUTO_TEST_CASE(settings__node__signet_context__expected) BC_REQUIRE_EQUAL(node.batch_verify, 1'000'000_u64); } -BC_AUTO_TEST_CASE(settings__services_provided__default__network_witness) +BC_AUTO_TEST_CASE(settings__services_provided__default__network_witness_v2) { const node::settings node{}; + BC_REQUIRE_EQUAL(node.services_provided(), 0x0809_u64); +} + +BC_AUTO_TEST_CASE(settings__services_provided__no_privacy__network_witness) +{ + node::settings node{}; + node.provide_privacy = false; BC_REQUIRE_EQUAL(node.services_provided(), 0x0009_u64); } -BC_AUTO_TEST_CASE(settings__services_provided__filters_privacy__network_witness_filters_v2) +BC_AUTO_TEST_CASE(settings__services_provided__filters__network_witness_filters_v2) { node::settings node{}; node.provide_filters = true; - node.provide_privacy = true; BC_REQUIRE_EQUAL(node.services_provided(), 0x0849_u64); }