diff --git a/doc/rippled-example.cfg b/doc/rippled-example.cfg index 9f1eaee217..97a6bc61f4 100644 --- a/doc/rippled-example.cfg +++ b/doc/rippled-example.cfg @@ -303,8 +303,8 @@ # Ripple network through a public-facing server, or for building a set # of cluster peers. # -# One IPv4 address or domain names per line is allowed. A port may optionally -# be specified after adding a space to the address. +# One IPv4 address or domain names per line is allowed. A port must be +# specified after adding a space to the address. # # # diff --git a/src/ripple/peerfinder/impl/Logic.h b/src/ripple/peerfinder/impl/Logic.h index a07ff7e85b..e3eac66203 100644 --- a/src/ripple/peerfinder/impl/Logic.h +++ b/src/ripple/peerfinder/impl/Logic.h @@ -211,6 +211,12 @@ public: for (auto const& remote_address : addresses) { + if (remote_address.port () == 0) + { + throw std::runtime_error ("Port not specified for address:" + + remote_address.to_string ()); + } + auto result (state->fixed.emplace (std::piecewise_construct, std::forward_as_tuple (remote_address), std::make_tuple (std::ref (m_clock))));