mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-21 11:05:51 +00:00
Compare commits
2 Commits
sync-2.2.0
...
tmp-conan
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c5a39098e | ||
|
|
fdc2a0e5a6 |
1
BUILD.md
1
BUILD.md
@@ -439,3 +439,4 @@ but it is more convenient to put them in a [profile][profile].
|
|||||||
[search]: https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure
|
[search]: https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure
|
||||||
[prefix_path]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
|
[prefix_path]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
|
||||||
[profile]: https://docs.conan.io/en/latest/reference/profiles.html
|
[profile]: https://docs.conan.io/en/latest/reference/profiles.html
|
||||||
|
|
||||||
|
|||||||
@@ -224,8 +224,7 @@ public:
|
|||||||
|
|
||||||
if (!ledger->info().accountHash.isNonZero())
|
if (!ledger->info().accountHash.isNonZero())
|
||||||
{
|
{
|
||||||
JLOG(j.fatal())
|
JLOG(j.fatal()) << "AH is zero: " << getJson({*ledger, {}});
|
||||||
<< "AH is zero: " << getJson({*ledger, {}}).asString();
|
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,8 @@ verifyHandshake(
|
|||||||
throw std::runtime_error("Invalid server domain");
|
throw std::runtime_error("Invalid server domain");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto const iter = headers.find("Network-ID"); iter != headers.end())
|
// Check the network. Omitting Network-ID (on either side ours, or theirs)
|
||||||
|
// means NID=0
|
||||||
{
|
{
|
||||||
uint32_t peer_nid = 0;
|
uint32_t peer_nid = 0;
|
||||||
if (auto const iter = headers.find("Network-ID"); iter != headers.end())
|
if (auto const iter = headers.find("Network-ID"); iter != headers.end())
|
||||||
@@ -249,10 +250,8 @@ verifyHandshake(
|
|||||||
throw std::runtime_error("Invalid peer network identifier");
|
throw std::runtime_error("Invalid peer network identifier");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!beast::lexicalCastChecked(peer_nid, std::string(iter->value())))
|
uint32_t our_nid = networkID ? *networkID : 0;
|
||||||
throw std::runtime_error("Invalid peer network identifier");
|
if (peer_nid != our_nid)
|
||||||
|
|
||||||
if (networkID && peer_nid != *networkID)
|
|
||||||
throw std::runtime_error("Peer is on a different network");
|
throw std::runtime_error("Peer is on a different network");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user