当前位置: 首页>>代码示例>>C++>>正文


C++ StellarMessage::envelope方法代码示例

本文整理汇总了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);
}
开发者ID:Haidashenko,项目名称:stellar-core,代码行数:12,代码来源:Peer.cpp

示例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);
}
开发者ID:irisli,项目名称:stellar-core,代码行数:12,代码来源:Peer.cpp

示例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);
}
开发者ID:datachand,项目名称:stellar-core,代码行数:19,代码来源:Peer.cpp

示例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));
}
开发者ID:jedmccaleb,项目名称:stellar-core,代码行数:11,代码来源:Tracker.cpp

示例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();
}
开发者ID:hanxueming126,项目名称:stellar-core,代码行数:14,代码来源:PendingEnvelopes.cpp

示例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();
                                        });
}
开发者ID:Haidashenko,项目名称:stellar-core,代码行数:24,代码来源:PendingEnvelopes.cpp


注:本文中的StellarMessage::envelope方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。