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


C++ data_buffer::write_int64方法代码示例

本文整理汇总了C++中data_buffer::write_int64方法的典型用法代码示例。如果您正苦于以下问题:C++ data_buffer::write_int64方法的具体用法?C++ data_buffer::write_int64怎么用?C++ data_buffer::write_int64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在data_buffer的用法示例。


在下文中一共展示了data_buffer::write_int64方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: encode

void chainblender_join::encode(data_buffer & buffer)
{
    /**
     * Encode the version.
     */
    buffer.write_uint32(m_version);
    
    /**
     * The session id must be null for a cbjoin.
     */
    if (m_hash_session_id.is_empty() == false)
    {
        log_error(
            "ChainBlender join message has invalid hash session "
            "id = " << m_hash_session_id.to_string() << "."
        );
    }
    
    /**
     * Encode the session id.
     */
    buffer.write_sha256(m_hash_session_id);
    
    /**
     * Encode the denomination.
     */
    buffer.write_int64(m_denomination);
}
开发者ID:greenmo000,项目名称:vcash,代码行数:28,代码来源:chainblender_join.cpp

示例2: encode

void key_wallet::encode(data_buffer & buffer)
{
    /**
     * Write the version.
     */
    buffer.write_uint32(constants::version_client);
    
    /**
     * Write the private key length.
     */
    buffer.write_var_int(m_key_private.size());
    
    /**
     * Write the private key.
     */
    if (m_key_private.size() > 0)
    {
        buffer.write_bytes(
            reinterpret_cast<const char *>(&m_key_private[0]),
            m_key_private.size()
        );
    }
    
    /**
     * Write the time created.
     */
    buffer.write_int64(m_time_created);
    
    /**
     * Write the time expires.
     */
    buffer.write_int64(m_time_expires);
    
    /**
     * Write the comment length.
     */
    buffer.write_var_int(m_comment.size());
    
    /**
     * Write the comment.
     */
    if (m_comment.size() > 0)
    {
        buffer.write_bytes(m_comment.data(), m_comment.size());
    }
}
开发者ID:machado-rev,项目名称:vcash,代码行数:46,代码来源:key_wallet.cpp

示例3: encode

void key_pool::encode(data_buffer & buffer, const bool & include_version)
{
    if (include_version)
    {
        /**
         * Write the version.
         */
        buffer.write_uint32(constants::version_client);
    }
    
    /**
     * Write the time.
     */
    buffer.write_int64(m_time);
    
    /**
     * Encode the public key.
     */
    m_key_public.encode(buffer);
}
开发者ID:machado-rev,项目名称:vcash,代码行数:20,代码来源:key_pool.cpp

示例4: encode

void transaction_out::encode(data_buffer & buffer) const
{
    /**
     * Write the value.
     */
    buffer.write_int64(m_value);
    
    /**
     * Write the m_script_public_key size var_int.
     */
    buffer.write_var_int(m_script_public_key.size());
    
    if (m_script_public_key.size() > 0)
    {
        /**
         * Write the m_script_public_key.
         */
        buffer.write_bytes(
            reinterpret_cast<const char *> (&m_script_public_key[0]),
            m_script_public_key.size()
        );
    }
}
开发者ID:jaggedMiner,项目名称:vanillacoin,代码行数:23,代码来源:transaction_out.cpp


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