mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Simplify RipplePublicKey:
This implements the bare minimum necessary to store a 33 byte public key and use it in ordered containers. It is an efficient and well defined alternative to RippleAddress when the caller only needs a node public key.
This commit is contained in:
@@ -492,7 +492,7 @@ ConnectAttempt::onReadBody (error_code ec,
|
||||
"Cluster name: " << name;
|
||||
|
||||
auto const result = overlay_.peerFinder().activate (
|
||||
slot_, RipplePublicKey(publicKey), cluster);
|
||||
slot_, publicKey.toPublicKey(), cluster);
|
||||
if (result != PeerFinder::Result::success)
|
||||
return fail("Outbound slots full");
|
||||
|
||||
@@ -605,7 +605,7 @@ ConnectAttempt::processResponse (beast::http::message const& m,
|
||||
"Cluster name: " << name;
|
||||
|
||||
auto const result = overlay_.peerFinder().activate (slot_,
|
||||
RipplePublicKey(publicKey), clusterNode);
|
||||
publicKey.toPublicKey(), clusterNode);
|
||||
if (result != PeerFinder::Result::success)
|
||||
return fail("Outbound slots full");
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ OverlayImpl::onHandoff (std::unique_ptr <beast::asio::ssl_bundle>&& ssl_bundle,
|
||||
publicKey, name);
|
||||
|
||||
auto const result = m_peerFinder->activate (slot,
|
||||
RipplePublicKey(publicKey), cluster);
|
||||
publicKey.toPublicKey(), cluster);
|
||||
if (result != PeerFinder::Result::success)
|
||||
{
|
||||
if (journal.trace) journal.trace <<
|
||||
@@ -409,7 +409,7 @@ OverlayImpl::add_active (std::shared_ptr<PeerImp> const& peer)
|
||||
journal_.debug <<
|
||||
"activated " << peer->getRemoteAddress() <<
|
||||
" (" << peer->id() <<
|
||||
":" << RipplePublicKey(peer->getNodePublic()) << ")";
|
||||
":" << peer->getNodePublic().toPublicKey() << ")";
|
||||
|
||||
// As we are not on the strand, run() must be called
|
||||
// while holding the lock, otherwise new I/O can be
|
||||
@@ -569,7 +569,7 @@ OverlayImpl::activate (std::shared_ptr<PeerImp> const& peer)
|
||||
journal_.debug <<
|
||||
"activated " << peer->getRemoteAddress() <<
|
||||
" (" << peer->id() <<
|
||||
":" << RipplePublicKey(peer->getNodePublic()) << ")";
|
||||
":" << peer->getNodePublic().toPublicKey() << ")";
|
||||
|
||||
// We just accepted this peer so we have non-zero active peers
|
||||
assert(size() != 0);
|
||||
|
||||
@@ -800,7 +800,7 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMHello> const& m)
|
||||
hello_ = *m;
|
||||
|
||||
auto const result = overlay_.peerFinder().activate (slot_,
|
||||
RipplePublicKey (publicKey_), cluster);
|
||||
publicKey_.toPublicKey(), cluster);
|
||||
|
||||
if (result == PeerFinder::Result::success)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user