/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: common/ledger.proto */

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "common/ledger.pb-c.h"
void   common__blockchain_info__init
                     (Common__BlockchainInfo         *message)
{
  static Common__BlockchainInfo init_value = COMMON__BLOCKCHAIN_INFO__INIT;
  *message = init_value;
}
size_t common__blockchain_info__get_packed_size
                     (const Common__BlockchainInfo *message)
{
  assert(message->base.descriptor == &common__blockchain_info__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t common__blockchain_info__pack
                     (const Common__BlockchainInfo *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &common__blockchain_info__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t common__blockchain_info__pack_to_buffer
                     (const Common__BlockchainInfo *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &common__blockchain_info__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Common__BlockchainInfo *
       common__blockchain_info__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Common__BlockchainInfo *)
     protobuf_c_message_unpack (&common__blockchain_info__descriptor,
                                allocator, len, data);
}
void   common__blockchain_info__free_unpacked
                     (Common__BlockchainInfo *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &common__blockchain_info__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor common__blockchain_info__field_descriptors[3] =
{
  {
    "height",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_UINT64,
    offsetof(Common__BlockchainInfo, has_height),
    offsetof(Common__BlockchainInfo, height),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "currentBlockHash",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(Common__BlockchainInfo, has_currentblockhash),
    offsetof(Common__BlockchainInfo, currentblockhash),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "previousBlockHash",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(Common__BlockchainInfo, has_previousblockhash),
    offsetof(Common__BlockchainInfo, previousblockhash),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned common__blockchain_info__field_indices_by_name[] = {
  1,   /* field[1] = currentBlockHash */
  0,   /* field[0] = height */
  2,   /* field[2] = previousBlockHash */
};
static const ProtobufCIntRange common__blockchain_info__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 3 }
};
const ProtobufCMessageDescriptor common__blockchain_info__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "common.BlockchainInfo",
  "BlockchainInfo",
  "Common__BlockchainInfo",
  "common",
  sizeof(Common__BlockchainInfo),
  3,
  common__blockchain_info__field_descriptors,
  common__blockchain_info__field_indices_by_name,
  1,  common__blockchain_info__number_ranges,
  (ProtobufCMessageInit) common__blockchain_info__init,
  NULL,NULL,NULL    /* reserved[123] */
};
