File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,14 +97,18 @@ class BCS_API settings
9797 // / Maximum cumulative number of address subscriptions per channel.
9898 uint32_t maximum_subscriptions{ 1'000'000 };
9999
100- // / Arbitrary server name returned by server.version.
100+ // / Arbitrary name returned by server.version and server.features .
101101 std::string server_name{ BC_USER_AGENT };
102102
103103 // / Arbitrary string returned by server.donation_address.
104104 std::string donation_address{};
105105
106106 // / Arbitrary string returned by server.banner.
107107 std::string banner_message{};
108+
109+ // / Advertised as self via server.features (limit one each per host).
110+ network::config::endpoints advertise_binds{};
111+ network::config::endpoints advertise_safes{};
108112 };
109113
110114 // / html (http/s) document server settings (has directory/default).
Original file line number Diff line number Diff line change @@ -1154,6 +1154,16 @@ options_metadata parser::load_settings() THROWS
11541154 value<std::string>(&configured.server .electrum .banner_message ),
11551155 " String returned by server.banner, defaults to empty."
11561156 )
1157+ (
1158+ " electrum.advertise_bind" ,
1159+ value<network::config::endpoints>(&configured.server .electrum .advertise_binds ),
1160+ " Advertised host:port at which this server can be reached (defaults to empty)."
1161+ )
1162+ (
1163+ " electrum.advertise_safe" ,
1164+ value<network::config::endpoints>(&configured.server .electrum .advertise_safes ),
1165+ " Advertised secure host:port at which this server can be reached (defaults to empty)."
1166+ )
11571167
11581168 /* [stratum_v1] */
11591169 (
Original file line number Diff line number Diff line change @@ -237,6 +237,8 @@ BOOST_AUTO_TEST_CASE(server__electrum_server__defaults__expected)
237237 BOOST_REQUIRE_EQUAL (server.server_name , BC_USER_AGENT);
238238 BOOST_REQUIRE (server.donation_address .empty ());
239239 BOOST_REQUIRE (server.banner_message .empty ());
240+ BOOST_REQUIRE (server.advertise_binds .empty ());
241+ BOOST_REQUIRE (server.advertise_safes .empty ());
240242}
241243
242244BOOST_AUTO_TEST_CASE (server__stratum_v1_server__defaults__expected)
You can’t perform that action at this time.
0 commit comments