mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-19 18:15:50 +00:00
Compare commits
10 Commits
actions-ca
...
nd-fix-war
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42be878b79 | ||
|
|
bf20b5efc5 | ||
|
|
96e69a0481 | ||
|
|
dcfe53c479 | ||
|
|
70bae7d055 | ||
|
|
14cab019fc | ||
|
|
f2e8d85733 | ||
|
|
ccc96ae27c | ||
|
|
6626e371a3 | ||
|
|
0814a63232 |
@@ -224,7 +224,8 @@ public:
|
||||
|
||||
if (!ledger->info().accountHash.isNonZero())
|
||||
{
|
||||
JLOG(j.fatal()) << "AH is zero: " << getJson({*ledger, {}});
|
||||
JLOG(j.fatal())
|
||||
<< "AH is zero: " << getJson({*ledger, {}}).asString();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,19 +239,14 @@ verifyHandshake(
|
||||
throw std::runtime_error("Invalid server domain");
|
||||
}
|
||||
|
||||
// Check the network. Omitting Network-ID (on either side ours, or theirs)
|
||||
// means NID=0
|
||||
{
|
||||
uint32_t peer_nid = 0;
|
||||
if (auto const iter = headers.find("Network-ID"); iter != headers.end())
|
||||
{
|
||||
if (!beast::lexicalCastChecked(
|
||||
peer_nid, std::string(iter->value())))
|
||||
throw std::runtime_error("Invalid peer network identifier");
|
||||
}
|
||||
std::uint32_t nid{0};
|
||||
|
||||
uint32_t our_nid = networkID ? *networkID : 0;
|
||||
if (peer_nid != our_nid)
|
||||
if (!beast::lexicalCastChecked(nid, std::string(iter->value())))
|
||||
throw std::runtime_error("Invalid peer network identifier");
|
||||
|
||||
if (!networkID && nid != 0 || networkID && nid != *networkID)
|
||||
throw std::runtime_error("Peer is on a different network");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user