本文整理汇总了C++中StellarMessage::envelope方法的典型用法代码示例。如果您正苦于以下问题:C++ StellarMessage::envelope方法的具体用法?C++ StellarMessage::envelope怎么用?C++ StellarMessage::envelope使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StellarMessage
的用法示例。
在下文中一共展示了StellarMessage::envelope方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CLOG
void
Peer::recvSCPMessage(StellarMessage const& msg)
{
SCPEnvelope envelope = msg.envelope();
CLOG(TRACE, "Overlay") << "recvSCPMessage node: "
<< binToHex(msg.envelope().statement.nodeID)
.substr(0, 6);
mApp.getOverlayManager().recvFloodedMsg(msg, shared_from_this());
mApp.getHerder().recvSCPEnvelope(envelope);
}
示例2: CLOG
void
Peer::recvSCPMessage(StellarMessage const& msg)
{
SCPEnvelope envelope = msg.envelope();
CLOG(TRACE, "Overlay") << "recvSCPMessage node: "
<< PubKeyUtils::toShortString(
msg.envelope().statement.nodeID);
mApp.getOverlayManager().recvFloodedMsg(msg, shared_from_this());
mApp.getHerder().recvSCPEnvelope(envelope);
}
示例3: CLOG
void
Peer::recvSCPMessage(StellarMessage const& msg)
{
SCPEnvelope envelope = msg.envelope();
CLOG(TRACE, "Overlay") << "recvSCPMessage qset: "
<< binToHex(msg.envelope().statement.quorumSetHash)
.substr(0, 6);
mApp.getOverlayManager().recvFloodedMsg(msg, shared_from_this());
auto cb = [msg, this](SCP::EnvelopeState state)
{
if (state == SCP::EnvelopeState::VALID)
{
mApp.getOverlayManager().broadcastMessage(msg);
}
};
mApp.getHerder().recvSCPEnvelope(envelope, cb);
}
示例4:
void
Tracker::listen(const SCPEnvelope& env)
{
mLastSeenSlotIndex = std::max(env.statement.slotIndex, mLastSeenSlotIndex);
StellarMessage m;
m.type(SCP_MESSAGE);
m.envelope() = env;
mWaitingEnvelopes.push_back(
std::make_pair(sha256(xdr::xdr_to_opaque(m)), env));
}
示例5: CLOG
void
PendingEnvelopes::envelopeReady(SCPEnvelope const& envelope)
{
StellarMessage msg;
msg.type(SCP_MESSAGE);
msg.envelope() = envelope;
mApp.getOverlayManager().broadcastMessage(msg);
mEnvelopes[envelope.statement.slotIndex].mReadyEnvelopes.push_back(
envelope);
CLOG(TRACE, "Herder") << "Envelope ready i:" << envelope.statement.slotIndex
<< " t:" << envelope.statement.pledges.type();
}
示例6:
void
PendingEnvelopes::envelopeReady(SCPEnvelope const& envelope)
{
StellarMessage msg;
msg.type(SCP_MESSAGE);
msg.envelope() = envelope;
mApp.getOverlayManager().broadcastMessage(msg);
mPendingEnvelopes[envelope.statement.slotIndex].push_back(envelope);
/*
// if envelope is on the right slot send into SCP
// TODO.1 : below
if(checkFutureCommitted(envelope))
{
mIsFutureCommitted.insert(envelope.statement.slotIndex);
}
*/
mApp.getClock().getIOService().post([this]()
{
mHerder.processSCPQueue();
});
}