Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions test/functional/p2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion test/functional/p2p_setup_fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
14 changes: 10 additions & 4 deletions test/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
Loading