mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Trim space in Endpoint::from_string
Fixes: RIPD-1643
This commit is contained in:
committed by
Nik Bougalis
parent
68bebc472a
commit
8098cba4c2
@@ -20,6 +20,7 @@
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/core/Config.h>
|
||||
#include <ripple/core/ConfigSections.h>
|
||||
#include <ripple/server/Port.h>
|
||||
#include <test/jtx/TestSuite.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/format.hpp>
|
||||
@@ -40,7 +41,7 @@ port_wss_admin
|
||||
[port_rpc]
|
||||
port = 5005
|
||||
ip = 127.0.0.1
|
||||
admin = 127.0.0.1
|
||||
admin = 127.0.0.1, ::1
|
||||
protocol = https
|
||||
|
||||
[port_peer]
|
||||
@@ -852,6 +853,24 @@ trustthesevalidators.gov
|
||||
}
|
||||
}
|
||||
|
||||
void testPort ()
|
||||
{
|
||||
detail::RippledCfgGuard const cfg(*this, "testPort", "", "");
|
||||
auto const& conf = cfg.config();
|
||||
if (!BEAST_EXPECT(conf.exists("port_rpc")))
|
||||
return;
|
||||
if (!BEAST_EXPECT(conf.exists("port_wss_admin")))
|
||||
return;
|
||||
ParsedPort rpc;
|
||||
if (!unexcept([&]() { parse_Port (rpc, conf["port_rpc"], log); }))
|
||||
return;
|
||||
BEAST_EXPECT(rpc.admin_ip && (rpc.admin_ip .get().size() == 2));
|
||||
ParsedPort wss;
|
||||
if (!unexcept([&]() { parse_Port (wss, conf["port_wss_admin"], log); }))
|
||||
return;
|
||||
BEAST_EXPECT(wss.admin_ip && (wss.admin_ip .get().size() == 1));
|
||||
}
|
||||
|
||||
void run () override
|
||||
{
|
||||
testLegacy ();
|
||||
@@ -860,6 +879,7 @@ trustthesevalidators.gov
|
||||
testValidatorsFile ();
|
||||
testSetup (false);
|
||||
testSetup (true);
|
||||
testPort ();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user