// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: block.proto
// Protobuf C++ Version: 5.26.1

#include "block.pb.h"

#include <algorithm>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/reflection_ops.h"
#include "google/protobuf/wire_format.h"
#include "google/protobuf/generated_message_tctable_impl.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace tari {
namespace rpc {

inline constexpr ProofOfWork::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : pow_data_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        pow_algo_{::uint64_t{0u}},
        _cached_size_{0} {}

template <typename>
PROTOBUF_CONSTEXPR ProofOfWork::ProofOfWork(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct ProofOfWorkDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ProofOfWorkDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~ProofOfWorkDefaultTypeInternal() {}
  union {
    ProofOfWork _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProofOfWorkDefaultTypeInternal _ProofOfWork_default_instance_;

inline constexpr PowAlgo::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : pow_algo_{static_cast< ::tari::rpc::PowAlgo_PowAlgos >(0)},
        _cached_size_{0} {}

template <typename>
PROTOBUF_CONSTEXPR PowAlgo::PowAlgo(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct PowAlgoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PowAlgoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PowAlgoDefaultTypeInternal() {}
  union {
    PowAlgo _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PowAlgoDefaultTypeInternal _PowAlgo_default_instance_;

inline constexpr NewBlockHeaderTemplate::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        prev_hash_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        total_kernel_offset_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        total_script_offset_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        pow_{nullptr},
        height_{::uint64_t{0u}},
        version_{0u} {}

template <typename>
PROTOBUF_CONSTEXPR NewBlockHeaderTemplate::NewBlockHeaderTemplate(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct NewBlockHeaderTemplateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NewBlockHeaderTemplateDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~NewBlockHeaderTemplateDefaultTypeInternal() {}
  union {
    NewBlockHeaderTemplate _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NewBlockHeaderTemplateDefaultTypeInternal _NewBlockHeaderTemplate_default_instance_;

inline constexpr BlockHeader::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        hash_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        prev_hash_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        output_mr_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        kernel_mr_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        input_mr_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        total_kernel_offset_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        total_script_offset_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        validator_node_mr_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        pow_{nullptr},
        height_{::uint64_t{0u}},
        timestamp_{::uint64_t{0u}},
        nonce_{::uint64_t{0u}},
        kernel_mmr_size_{::uint64_t{0u}},
        output_mmr_size_{::uint64_t{0u}},
        validator_node_size_{::uint64_t{0u}},
        version_{0u} {}

template <typename>
PROTOBUF_CONSTEXPR BlockHeader::BlockHeader(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct BlockHeaderDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BlockHeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~BlockHeaderDefaultTypeInternal() {}
  union {
    BlockHeader _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlockHeaderDefaultTypeInternal _BlockHeader_default_instance_;

inline constexpr NewBlockTemplate::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        header_{nullptr},
        body_{nullptr} {}

template <typename>
PROTOBUF_CONSTEXPR NewBlockTemplate::NewBlockTemplate(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct NewBlockTemplateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NewBlockTemplateDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~NewBlockTemplateDefaultTypeInternal() {}
  union {
    NewBlockTemplate _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NewBlockTemplateDefaultTypeInternal _NewBlockTemplate_default_instance_;

inline constexpr Block::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        header_{nullptr},
        body_{nullptr} {}

template <typename>
PROTOBUF_CONSTEXPR Block::Block(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct BlockDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BlockDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~BlockDefaultTypeInternal() {}
  union {
    Block _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlockDefaultTypeInternal _Block_default_instance_;

inline constexpr HistoricalBlock::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        block_{nullptr},
        confirmations_{::uint64_t{0u}} {}

template <typename>
PROTOBUF_CONSTEXPR HistoricalBlock::HistoricalBlock(::_pbi::ConstantInitialized)
    : _impl_(::_pbi::ConstantInitialized()) {}
struct HistoricalBlockDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HistoricalBlockDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~HistoricalBlockDefaultTypeInternal() {}
  union {
    HistoricalBlock _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HistoricalBlockDefaultTypeInternal _HistoricalBlock_default_instance_;
}  // namespace rpc
}  // namespace tari
static ::_pb::Metadata file_level_metadata_block_2eproto[7];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_block_2eproto[1];
static constexpr const ::_pb::ServiceDescriptor**
    file_level_service_descriptors_block_2eproto = nullptr;
const ::uint32_t
    TableStruct_block_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
        protodesc_cold) = {
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_._has_bits_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.hash_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.version_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.height_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.prev_hash_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.timestamp_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.output_mr_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.kernel_mr_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.input_mr_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.total_kernel_offset_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.nonce_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.pow_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.kernel_mmr_size_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.output_mmr_size_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.total_script_offset_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.validator_node_mr_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.validator_node_size_),
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        0,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        ~0u,  // no _has_bits_
        PROTOBUF_FIELD_OFFSET(::tari::rpc::ProofOfWork, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::ProofOfWork, _impl_.pow_algo_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::ProofOfWork, _impl_.pow_data_),
        ~0u,  // no _has_bits_
        PROTOBUF_FIELD_OFFSET(::tari::rpc::PowAlgo, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::PowAlgo, _impl_.pow_algo_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::Block, _impl_._has_bits_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::Block, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::Block, _impl_.header_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::Block, _impl_.body_),
        0,
        1,
        PROTOBUF_FIELD_OFFSET(::tari::rpc::HistoricalBlock, _impl_._has_bits_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::HistoricalBlock, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::HistoricalBlock, _impl_.confirmations_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::HistoricalBlock, _impl_.block_),
        ~0u,
        0,
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_._has_bits_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_.version_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_.height_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_.prev_hash_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_.total_kernel_offset_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_.pow_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockHeaderTemplate, _impl_.total_script_offset_),
        ~0u,
        ~0u,
        ~0u,
        ~0u,
        0,
        ~0u,
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _impl_._has_bits_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        ~0u,  // no _inlined_string_donated_
        ~0u,  // no _split_
        ~0u,  // no sizeof(Split)
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _impl_.header_),
        PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _impl_.body_),
        0,
        1,
};

static const ::_pbi::MigrationSchema
    schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
        {0, 24, -1, sizeof(::tari::rpc::BlockHeader)},
        {40, -1, -1, sizeof(::tari::rpc::ProofOfWork)},
        {50, -1, -1, sizeof(::tari::rpc::PowAlgo)},
        {59, 69, -1, sizeof(::tari::rpc::Block)},
        {71, 81, -1, sizeof(::tari::rpc::HistoricalBlock)},
        {83, 97, -1, sizeof(::tari::rpc::NewBlockHeaderTemplate)},
        {103, 113, -1, sizeof(::tari::rpc::NewBlockTemplate)},
};
static const ::_pb::Message* const file_default_instances[] = {
    &::tari::rpc::_BlockHeader_default_instance_._instance,
    &::tari::rpc::_ProofOfWork_default_instance_._instance,
    &::tari::rpc::_PowAlgo_default_instance_._instance,
    &::tari::rpc::_Block_default_instance_._instance,
    &::tari::rpc::_HistoricalBlock_default_instance_._instance,
    &::tari::rpc::_NewBlockHeaderTemplate_default_instance_._instance,
    &::tari::rpc::_NewBlockTemplate_default_instance_._instance,
};
const char descriptor_table_protodef_block_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
    protodesc_cold) = {
    "\n\013block.proto\022\010tari.rpc\032\021transaction.pro"
    "to\"\361\002\n\013BlockHeader\022\014\n\004hash\030\001 \001(\014\022\017\n\007vers"
    "ion\030\002 \001(\r\022\016\n\006height\030\003 \001(\004\022\021\n\tprev_hash\030\004"
    " \001(\014\022\021\n\ttimestamp\030\005 \001(\004\022\021\n\toutput_mr\030\006 \001"
    "(\014\022\021\n\tkernel_mr\030\010 \001(\014\022\020\n\010input_mr\030\t \001(\014\022"
    "\033\n\023total_kernel_offset\030\n \001(\014\022\r\n\005nonce\030\013 "
    "\001(\004\022\"\n\003pow\030\014 \001(\0132\025.tari.rpc.ProofOfWork\022"
    "\027\n\017kernel_mmr_size\030\r \001(\004\022\027\n\017output_mmr_s"
    "ize\030\016 \001(\004\022\033\n\023total_script_offset\030\017 \001(\014\022\031"
    "\n\021validator_node_mr\030\020 \001(\014\022\033\n\023validator_n"
    "ode_size\030\021 \001(\004\"1\n\013ProofOfWork\022\020\n\010pow_alg"
    "o\030\001 \001(\004\022\020\n\010pow_data\030\004 \001(\014\"o\n\007PowAlgo\022,\n\010"
    "pow_algo\030\001 \001(\0162\032.tari.rpc.PowAlgo.PowAlg"
    "os\"6\n\010PowAlgos\022\025\n\021POW_ALGOS_RANDOMX\020\000\022\023\n"
    "\017POW_ALGOS_SHA3X\020\001\"U\n\005Block\022%\n\006header\030\001 "
    "\001(\0132\025.tari.rpc.BlockHeader\022%\n\004body\030\002 \001(\013"
    "2\027.tari.rpc.AggregateBody\"H\n\017HistoricalB"
    "lock\022\025\n\rconfirmations\030\001 \001(\004\022\036\n\005block\030\002 \001"
    "(\0132\017.tari.rpc.Block\"\252\001\n\026NewBlockHeaderTe"
    "mplate\022\017\n\007version\030\001 \001(\r\022\016\n\006height\030\002 \001(\004\022"
    "\021\n\tprev_hash\030\003 \001(\014\022\033\n\023total_kernel_offse"
    "t\030\004 \001(\014\022\"\n\003pow\030\005 \001(\0132\025.tari.rpc.ProofOfW"
    "ork\022\033\n\023total_script_offset\030\007 \001(\014\"k\n\020NewB"
    "lockTemplate\0220\n\006header\030\001 \001(\0132 .tari.rpc."
    "NewBlockHeaderTemplate\022%\n\004body\030\002 \001(\0132\027.t"
    "ari.rpc.AggregateBodyb\006proto3"
};
static const ::_pbi::DescriptorTable* const descriptor_table_block_2eproto_deps[1] =
    {
        &::descriptor_table_transaction_2eproto,
};
static ::absl::once_flag descriptor_table_block_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_block_2eproto = {
    false,
    false,
    1029,
    descriptor_table_protodef_block_2eproto,
    "block.proto",
    &descriptor_table_block_2eproto_once,
    descriptor_table_block_2eproto_deps,
    1,
    7,
    schemas,
    file_default_instances,
    TableStruct_block_2eproto::offsets,
    file_level_metadata_block_2eproto,
    file_level_enum_descriptors_block_2eproto,
    file_level_service_descriptors_block_2eproto,
};

// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
//   vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_block_2eproto_getter() {
  return &descriptor_table_block_2eproto;
}
namespace tari {
namespace rpc {
const ::google::protobuf::EnumDescriptor* PowAlgo_PowAlgos_descriptor() {
  ::google::protobuf::internal::AssignDescriptors(&descriptor_table_block_2eproto);
  return file_level_enum_descriptors_block_2eproto[0];
}
PROTOBUF_CONSTINIT const uint32_t PowAlgo_PowAlgos_internal_data_[] = {
    131072u, 0u, };
bool PowAlgo_PowAlgos_IsValid(int value) {
  return 0 <= value && value <= 1;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr PowAlgo_PowAlgos PowAlgo::POW_ALGOS_RANDOMX;
constexpr PowAlgo_PowAlgos PowAlgo::POW_ALGOS_SHA3X;
constexpr PowAlgo_PowAlgos PowAlgo::PowAlgos_MIN;
constexpr PowAlgo_PowAlgos PowAlgo::PowAlgos_MAX;
constexpr int PowAlgo::PowAlgos_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
// ===================================================================

class BlockHeader::_Internal {
 public:
  using HasBits = decltype(std::declval<BlockHeader>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_._has_bits_);
};

BlockHeader::BlockHeader(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.BlockHeader)
}
inline PROTOBUF_NDEBUG_INLINE BlockHeader::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
    const Impl_& from)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        hash_(arena, from.hash_),
        prev_hash_(arena, from.prev_hash_),
        output_mr_(arena, from.output_mr_),
        kernel_mr_(arena, from.kernel_mr_),
        input_mr_(arena, from.input_mr_),
        total_kernel_offset_(arena, from.total_kernel_offset_),
        total_script_offset_(arena, from.total_script_offset_),
        validator_node_mr_(arena, from.validator_node_mr_) {}

BlockHeader::BlockHeader(
    ::google::protobuf::Arena* arena,
    const BlockHeader& from)
    : ::google::protobuf::Message(arena) {
  BlockHeader* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.pow_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::ProofOfWork>(
                              arena, *from._impl_.pow_)
                        : nullptr;
  ::memcpy(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, height_),
           reinterpret_cast<const char *>(&from._impl_) +
               offsetof(Impl_, height_),
           offsetof(Impl_, version_) -
               offsetof(Impl_, height_) +
               sizeof(Impl_::version_));

  // @@protoc_insertion_point(copy_constructor:tari.rpc.BlockHeader)
}
inline PROTOBUF_NDEBUG_INLINE BlockHeader::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : _cached_size_{0},
        hash_(arena),
        prev_hash_(arena),
        output_mr_(arena),
        kernel_mr_(arena),
        input_mr_(arena),
        total_kernel_offset_(arena),
        total_script_offset_(arena),
        validator_node_mr_(arena) {}

inline void BlockHeader::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, pow_),
           0,
           offsetof(Impl_, version_) -
               offsetof(Impl_, pow_) +
               sizeof(Impl_::version_));
}
BlockHeader::~BlockHeader() {
  // @@protoc_insertion_point(destructor:tari.rpc.BlockHeader)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void BlockHeader::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  _impl_.hash_.Destroy();
  _impl_.prev_hash_.Destroy();
  _impl_.output_mr_.Destroy();
  _impl_.kernel_mr_.Destroy();
  _impl_.input_mr_.Destroy();
  _impl_.total_kernel_offset_.Destroy();
  _impl_.total_script_offset_.Destroy();
  _impl_.validator_node_mr_.Destroy();
  delete _impl_.pow_;
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
BlockHeader::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_._cached_size_),
              false,
          },
          &BlockHeader::MergeImpl,
          &BlockHeader::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void BlockHeader::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.BlockHeader)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.hash_.ClearToEmpty();
  _impl_.prev_hash_.ClearToEmpty();
  _impl_.output_mr_.ClearToEmpty();
  _impl_.kernel_mr_.ClearToEmpty();
  _impl_.input_mr_.ClearToEmpty();
  _impl_.total_kernel_offset_.ClearToEmpty();
  _impl_.total_script_offset_.ClearToEmpty();
  _impl_.validator_node_mr_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.pow_ != nullptr);
    _impl_.pow_->Clear();
  }
  ::memset(&_impl_.height_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.version_) -
      reinterpret_cast<char*>(&_impl_.height_)) + sizeof(_impl_.version_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* BlockHeader::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<5, 16, 1, 0, 2> BlockHeader::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_._has_bits_),
    0, // no _extensions_
    17, 248,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294836288,  // skipmap
    offsetof(decltype(_table_), field_entries),
    16,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    &_BlockHeader_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::BlockHeader>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
    // bytes hash = 1;
    {::_pbi::TcParser::FastBS1,
     {10, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.hash_)}},
    // uint32 version = 2;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(BlockHeader, _impl_.version_), 63>(),
     {16, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.version_)}},
    // uint64 height = 3;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(BlockHeader, _impl_.height_), 63>(),
     {24, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.height_)}},
    // bytes prev_hash = 4;
    {::_pbi::TcParser::FastBS1,
     {34, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.prev_hash_)}},
    // uint64 timestamp = 5;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(BlockHeader, _impl_.timestamp_), 63>(),
     {40, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.timestamp_)}},
    // bytes output_mr = 6;
    {::_pbi::TcParser::FastBS1,
     {50, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.output_mr_)}},
    {::_pbi::TcParser::MiniParse, {}},
    // bytes kernel_mr = 8;
    {::_pbi::TcParser::FastBS1,
     {66, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.kernel_mr_)}},
    // bytes input_mr = 9;
    {::_pbi::TcParser::FastBS1,
     {74, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.input_mr_)}},
    // bytes total_kernel_offset = 10;
    {::_pbi::TcParser::FastBS1,
     {82, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.total_kernel_offset_)}},
    // uint64 nonce = 11;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(BlockHeader, _impl_.nonce_), 63>(),
     {88, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.nonce_)}},
    // .tari.rpc.ProofOfWork pow = 12;
    {::_pbi::TcParser::FastMtS1,
     {98, 0, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.pow_)}},
    // uint64 kernel_mmr_size = 13;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(BlockHeader, _impl_.kernel_mmr_size_), 63>(),
     {104, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.kernel_mmr_size_)}},
    // uint64 output_mmr_size = 14;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(BlockHeader, _impl_.output_mmr_size_), 63>(),
     {112, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.output_mmr_size_)}},
    // bytes total_script_offset = 15;
    {::_pbi::TcParser::FastBS1,
     {122, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.total_script_offset_)}},
    // bytes validator_node_mr = 16;
    {::_pbi::TcParser::FastBS2,
     {386, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.validator_node_mr_)}},
    // uint64 validator_node_size = 17;
    {::_pbi::TcParser::FastV64S2,
     {392, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.validator_node_size_)}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
  }}, {{
    65535, 65535
  }}, {{
    // bytes hash = 1;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.hash_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // uint32 version = 2;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.version_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
    // uint64 height = 3;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.height_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // bytes prev_hash = 4;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.prev_hash_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // uint64 timestamp = 5;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.timestamp_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // bytes output_mr = 6;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.output_mr_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // bytes kernel_mr = 8;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.kernel_mr_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // bytes input_mr = 9;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.input_mr_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // bytes total_kernel_offset = 10;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.total_kernel_offset_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // uint64 nonce = 11;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.nonce_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // .tari.rpc.ProofOfWork pow = 12;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.pow_), _Internal::kHasBitsOffset + 0, 0,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // uint64 kernel_mmr_size = 13;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.kernel_mmr_size_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // uint64 output_mmr_size = 14;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.output_mmr_size_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // bytes total_script_offset = 15;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.total_script_offset_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // bytes validator_node_mr = 16;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.validator_node_mr_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // uint64 validator_node_size = 17;
    {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.validator_node_size_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
  }}, {{
    {::_pbi::TcParser::GetTable<::tari::rpc::ProofOfWork>()},
  }}, {{
  }},
};

::uint8_t* BlockHeader::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.BlockHeader)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  // bytes hash = 1;
  if (!this->_internal_hash().empty()) {
    const std::string& _s = this->_internal_hash();
    target = stream->WriteBytesMaybeAliased(1, _s, target);
  }

  // uint32 version = 2;
  if (this->_internal_version() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        2, this->_internal_version(), target);
  }

  // uint64 height = 3;
  if (this->_internal_height() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        3, this->_internal_height(), target);
  }

  // bytes prev_hash = 4;
  if (!this->_internal_prev_hash().empty()) {
    const std::string& _s = this->_internal_prev_hash();
    target = stream->WriteBytesMaybeAliased(4, _s, target);
  }

  // uint64 timestamp = 5;
  if (this->_internal_timestamp() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        5, this->_internal_timestamp(), target);
  }

  // bytes output_mr = 6;
  if (!this->_internal_output_mr().empty()) {
    const std::string& _s = this->_internal_output_mr();
    target = stream->WriteBytesMaybeAliased(6, _s, target);
  }

  // bytes kernel_mr = 8;
  if (!this->_internal_kernel_mr().empty()) {
    const std::string& _s = this->_internal_kernel_mr();
    target = stream->WriteBytesMaybeAliased(8, _s, target);
  }

  // bytes input_mr = 9;
  if (!this->_internal_input_mr().empty()) {
    const std::string& _s = this->_internal_input_mr();
    target = stream->WriteBytesMaybeAliased(9, _s, target);
  }

  // bytes total_kernel_offset = 10;
  if (!this->_internal_total_kernel_offset().empty()) {
    const std::string& _s = this->_internal_total_kernel_offset();
    target = stream->WriteBytesMaybeAliased(10, _s, target);
  }

  // uint64 nonce = 11;
  if (this->_internal_nonce() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        11, this->_internal_nonce(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .tari.rpc.ProofOfWork pow = 12;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        12, *_impl_.pow_, _impl_.pow_->GetCachedSize(), target, stream);
  }

  // uint64 kernel_mmr_size = 13;
  if (this->_internal_kernel_mmr_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        13, this->_internal_kernel_mmr_size(), target);
  }

  // uint64 output_mmr_size = 14;
  if (this->_internal_output_mmr_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        14, this->_internal_output_mmr_size(), target);
  }

  // bytes total_script_offset = 15;
  if (!this->_internal_total_script_offset().empty()) {
    const std::string& _s = this->_internal_total_script_offset();
    target = stream->WriteBytesMaybeAliased(15, _s, target);
  }

  // bytes validator_node_mr = 16;
  if (!this->_internal_validator_node_mr().empty()) {
    const std::string& _s = this->_internal_validator_node_mr();
    target = stream->WriteBytesMaybeAliased(16, _s, target);
  }

  // uint64 validator_node_size = 17;
  if (this->_internal_validator_node_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        17, this->_internal_validator_node_size(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.BlockHeader)
  return target;
}

::size_t BlockHeader::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.BlockHeader)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes hash = 1;
  if (!this->_internal_hash().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_hash());
  }

  // bytes prev_hash = 4;
  if (!this->_internal_prev_hash().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_prev_hash());
  }

  // bytes output_mr = 6;
  if (!this->_internal_output_mr().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_output_mr());
  }

  // bytes kernel_mr = 8;
  if (!this->_internal_kernel_mr().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_kernel_mr());
  }

  // bytes input_mr = 9;
  if (!this->_internal_input_mr().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_input_mr());
  }

  // bytes total_kernel_offset = 10;
  if (!this->_internal_total_kernel_offset().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_total_kernel_offset());
  }

  // bytes total_script_offset = 15;
  if (!this->_internal_total_script_offset().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_total_script_offset());
  }

  // bytes validator_node_mr = 16;
  if (!this->_internal_validator_node_mr().empty()) {
    total_size += 2 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_validator_node_mr());
  }

  // .tari.rpc.ProofOfWork pow = 12;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size +=
        1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.pow_);
  }

  // uint64 height = 3;
  if (this->_internal_height() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_height());
  }

  // uint64 timestamp = 5;
  if (this->_internal_timestamp() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_timestamp());
  }

  // uint64 nonce = 11;
  if (this->_internal_nonce() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_nonce());
  }

  // uint64 kernel_mmr_size = 13;
  if (this->_internal_kernel_mmr_size() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_kernel_mmr_size());
  }

  // uint64 output_mmr_size = 14;
  if (this->_internal_output_mmr_size() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_output_mmr_size());
  }

  // uint64 validator_node_size = 17;
  if (this->_internal_validator_node_size() != 0) {
    total_size += 2 + ::_pbi::WireFormatLite::UInt64Size(
                                    this->_internal_validator_node_size());
  }

  // uint32 version = 2;
  if (this->_internal_version() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
        this->_internal_version());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void BlockHeader::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<BlockHeader*>(&to_msg);
  auto& from = static_cast<const BlockHeader&>(from_msg);
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.BlockHeader)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_hash().empty()) {
    _this->_internal_set_hash(from._internal_hash());
  }
  if (!from._internal_prev_hash().empty()) {
    _this->_internal_set_prev_hash(from._internal_prev_hash());
  }
  if (!from._internal_output_mr().empty()) {
    _this->_internal_set_output_mr(from._internal_output_mr());
  }
  if (!from._internal_kernel_mr().empty()) {
    _this->_internal_set_kernel_mr(from._internal_kernel_mr());
  }
  if (!from._internal_input_mr().empty()) {
    _this->_internal_set_input_mr(from._internal_input_mr());
  }
  if (!from._internal_total_kernel_offset().empty()) {
    _this->_internal_set_total_kernel_offset(from._internal_total_kernel_offset());
  }
  if (!from._internal_total_script_offset().empty()) {
    _this->_internal_set_total_script_offset(from._internal_total_script_offset());
  }
  if (!from._internal_validator_node_mr().empty()) {
    _this->_internal_set_validator_node_mr(from._internal_validator_node_mr());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(from._impl_.pow_ != nullptr);
    if (_this->_impl_.pow_ == nullptr) {
      _this->_impl_.pow_ =
          ::google::protobuf::Message::CopyConstruct<::tari::rpc::ProofOfWork>(arena, *from._impl_.pow_);
    } else {
      _this->_impl_.pow_->MergeFrom(*from._impl_.pow_);
    }
  }
  if (from._internal_height() != 0) {
    _this->_impl_.height_ = from._impl_.height_;
  }
  if (from._internal_timestamp() != 0) {
    _this->_impl_.timestamp_ = from._impl_.timestamp_;
  }
  if (from._internal_nonce() != 0) {
    _this->_impl_.nonce_ = from._impl_.nonce_;
  }
  if (from._internal_kernel_mmr_size() != 0) {
    _this->_impl_.kernel_mmr_size_ = from._impl_.kernel_mmr_size_;
  }
  if (from._internal_output_mmr_size() != 0) {
    _this->_impl_.output_mmr_size_ = from._impl_.output_mmr_size_;
  }
  if (from._internal_validator_node_size() != 0) {
    _this->_impl_.validator_node_size_ = from._impl_.validator_node_size_;
  }
  if (from._internal_version() != 0) {
    _this->_impl_.version_ = from._impl_.version_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void BlockHeader::CopyFrom(const BlockHeader& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.BlockHeader)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool BlockHeader::IsInitialized() const {
  return true;
}

void BlockHeader::InternalSwap(BlockHeader* PROTOBUF_RESTRICT other) {
  using std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.hash_, &other->_impl_.hash_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.prev_hash_, &other->_impl_.prev_hash_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.output_mr_, &other->_impl_.output_mr_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.kernel_mr_, &other->_impl_.kernel_mr_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.input_mr_, &other->_impl_.input_mr_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.total_kernel_offset_, &other->_impl_.total_kernel_offset_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.total_script_offset_, &other->_impl_.total_script_offset_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.validator_node_mr_, &other->_impl_.validator_node_mr_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.version_)
      + sizeof(BlockHeader::_impl_.version_)
      - PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.pow_)>(
          reinterpret_cast<char*>(&_impl_.pow_),
          reinterpret_cast<char*>(&other->_impl_.pow_));
}

::google::protobuf::Metadata BlockHeader::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[0]);
}
// ===================================================================

class ProofOfWork::_Internal {
 public:
};

ProofOfWork::ProofOfWork(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.ProofOfWork)
}
inline PROTOBUF_NDEBUG_INLINE ProofOfWork::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
    const Impl_& from)
      : pow_data_(arena, from.pow_data_),
        _cached_size_{0} {}

ProofOfWork::ProofOfWork(
    ::google::protobuf::Arena* arena,
    const ProofOfWork& from)
    : ::google::protobuf::Message(arena) {
  ProofOfWork* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  _impl_.pow_algo_ = from._impl_.pow_algo_;

  // @@protoc_insertion_point(copy_constructor:tari.rpc.ProofOfWork)
}
inline PROTOBUF_NDEBUG_INLINE ProofOfWork::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : pow_data_(arena),
        _cached_size_{0} {}

inline void ProofOfWork::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.pow_algo_ = {};
}
ProofOfWork::~ProofOfWork() {
  // @@protoc_insertion_point(destructor:tari.rpc.ProofOfWork)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void ProofOfWork::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  _impl_.pow_data_.Destroy();
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
ProofOfWork::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(ProofOfWork, _impl_._cached_size_),
              false,
          },
          &ProofOfWork::MergeImpl,
          &ProofOfWork::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void ProofOfWork::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.ProofOfWork)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.pow_data_.ClearToEmpty();
  _impl_.pow_algo_ = ::uint64_t{0u};
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* ProofOfWork::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 0, 2> ProofOfWork::_table_ = {
  {
    0,  // no _has_bits_
    0, // no _extensions_
    4, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967286,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    0,  // num_aux_entries
    offsetof(decltype(_table_), field_names),  // no aux_entries
    &_ProofOfWork_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::ProofOfWork>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // bytes pow_data = 4;
    {::_pbi::TcParser::FastBS1,
     {34, 63, 0, PROTOBUF_FIELD_OFFSET(ProofOfWork, _impl_.pow_data_)}},
    // uint64 pow_algo = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ProofOfWork, _impl_.pow_algo_), 63>(),
     {8, 63, 0, PROTOBUF_FIELD_OFFSET(ProofOfWork, _impl_.pow_algo_)}},
  }}, {{
    65535, 65535
  }}, {{
    // uint64 pow_algo = 1;
    {PROTOBUF_FIELD_OFFSET(ProofOfWork, _impl_.pow_algo_), 0, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // bytes pow_data = 4;
    {PROTOBUF_FIELD_OFFSET(ProofOfWork, _impl_.pow_data_), 0, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
  }},
  // no aux_entries
  {{
  }},
};

::uint8_t* ProofOfWork::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.ProofOfWork)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  // uint64 pow_algo = 1;
  if (this->_internal_pow_algo() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        1, this->_internal_pow_algo(), target);
  }

  // bytes pow_data = 4;
  if (!this->_internal_pow_data().empty()) {
    const std::string& _s = this->_internal_pow_data();
    target = stream->WriteBytesMaybeAliased(4, _s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.ProofOfWork)
  return target;
}

::size_t ProofOfWork::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.ProofOfWork)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes pow_data = 4;
  if (!this->_internal_pow_data().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_pow_data());
  }

  // uint64 pow_algo = 1;
  if (this->_internal_pow_algo() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_pow_algo());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void ProofOfWork::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<ProofOfWork*>(&to_msg);
  auto& from = static_cast<const ProofOfWork&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.ProofOfWork)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_pow_data().empty()) {
    _this->_internal_set_pow_data(from._internal_pow_data());
  }
  if (from._internal_pow_algo() != 0) {
    _this->_impl_.pow_algo_ = from._impl_.pow_algo_;
  }
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void ProofOfWork::CopyFrom(const ProofOfWork& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.ProofOfWork)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool ProofOfWork::IsInitialized() const {
  return true;
}

void ProofOfWork::InternalSwap(ProofOfWork* PROTOBUF_RESTRICT other) {
  using std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pow_data_, &other->_impl_.pow_data_, arena);
        swap(_impl_.pow_algo_, other->_impl_.pow_algo_);
}

::google::protobuf::Metadata ProofOfWork::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[1]);
}
// ===================================================================

class PowAlgo::_Internal {
 public:
};

PowAlgo::PowAlgo(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.PowAlgo)
}
PowAlgo::PowAlgo(
    ::google::protobuf::Arena* arena, const PowAlgo& from)
    : PowAlgo(arena) {
  MergeFrom(from);
}
inline PROTOBUF_NDEBUG_INLINE PowAlgo::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : _cached_size_{0} {}

inline void PowAlgo::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.pow_algo_ = {};
}
PowAlgo::~PowAlgo() {
  // @@protoc_insertion_point(destructor:tari.rpc.PowAlgo)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void PowAlgo::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
PowAlgo::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(PowAlgo, _impl_._cached_size_),
              false,
          },
          &PowAlgo::MergeImpl,
          &PowAlgo::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void PowAlgo::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.PowAlgo)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.pow_algo_ = 0;
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* PowAlgo::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 0, 0, 2> PowAlgo::_table_ = {
  {
    0,  // no _has_bits_
    0, // no _extensions_
    1, 0,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967294,  // skipmap
    offsetof(decltype(_table_), field_entries),
    1,  // num_field_entries
    0,  // num_aux_entries
    offsetof(decltype(_table_), field_names),  // no aux_entries
    &_PowAlgo_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::PowAlgo>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // .tari.rpc.PowAlgo.PowAlgos pow_algo = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(PowAlgo, _impl_.pow_algo_), 63>(),
     {8, 63, 0, PROTOBUF_FIELD_OFFSET(PowAlgo, _impl_.pow_algo_)}},
  }}, {{
    65535, 65535
  }}, {{
    // .tari.rpc.PowAlgo.PowAlgos pow_algo = 1;
    {PROTOBUF_FIELD_OFFSET(PowAlgo, _impl_.pow_algo_), 0, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
  }},
  // no aux_entries
  {{
  }},
};

::uint8_t* PowAlgo::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.PowAlgo)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  // .tari.rpc.PowAlgo.PowAlgos pow_algo = 1;
  if (this->_internal_pow_algo() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_pow_algo(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.PowAlgo)
  return target;
}

::size_t PowAlgo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.PowAlgo)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // .tari.rpc.PowAlgo.PowAlgos pow_algo = 1;
  if (this->_internal_pow_algo() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_pow_algo());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void PowAlgo::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<PowAlgo*>(&to_msg);
  auto& from = static_cast<const PowAlgo&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.PowAlgo)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_pow_algo() != 0) {
    _this->_impl_.pow_algo_ = from._impl_.pow_algo_;
  }
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void PowAlgo::CopyFrom(const PowAlgo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.PowAlgo)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool PowAlgo::IsInitialized() const {
  return true;
}

void PowAlgo::InternalSwap(PowAlgo* PROTOBUF_RESTRICT other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.pow_algo_, other->_impl_.pow_algo_);
}

::google::protobuf::Metadata PowAlgo::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[2]);
}
// ===================================================================

class Block::_Internal {
 public:
  using HasBits = decltype(std::declval<Block>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Block, _impl_._has_bits_);
};

void Block::clear_body() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.body_ != nullptr) _impl_.body_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
Block::Block(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.Block)
}
inline PROTOBUF_NDEBUG_INLINE Block::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
    const Impl_& from)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

Block::Block(
    ::google::protobuf::Arena* arena,
    const Block& from)
    : ::google::protobuf::Message(arena) {
  Block* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.header_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::BlockHeader>(
                              arena, *from._impl_.header_)
                        : nullptr;
  _impl_.body_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::AggregateBody>(
                              arena, *from._impl_.body_)
                        : nullptr;

  // @@protoc_insertion_point(copy_constructor:tari.rpc.Block)
}
inline PROTOBUF_NDEBUG_INLINE Block::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : _cached_size_{0} {}

inline void Block::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, header_),
           0,
           offsetof(Impl_, body_) -
               offsetof(Impl_, header_) +
               sizeof(Impl_::body_));
}
Block::~Block() {
  // @@protoc_insertion_point(destructor:tari.rpc.Block)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void Block::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  delete _impl_.header_;
  delete _impl_.body_;
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
Block::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(Block, _impl_._cached_size_),
              false,
          },
          &Block::MergeImpl,
          &Block::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void Block::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.Block)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.header_ != nullptr);
      _impl_.header_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.body_ != nullptr);
      _impl_.body_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* Block::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 2, 0, 2> Block::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(Block, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    2,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    &_Block_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::Block>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // .tari.rpc.AggregateBody body = 2;
    {::_pbi::TcParser::FastMtS1,
     {18, 1, 1, PROTOBUF_FIELD_OFFSET(Block, _impl_.body_)}},
    // .tari.rpc.BlockHeader header = 1;
    {::_pbi::TcParser::FastMtS1,
     {10, 0, 0, PROTOBUF_FIELD_OFFSET(Block, _impl_.header_)}},
  }}, {{
    65535, 65535
  }}, {{
    // .tari.rpc.BlockHeader header = 1;
    {PROTOBUF_FIELD_OFFSET(Block, _impl_.header_), _Internal::kHasBitsOffset + 0, 0,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // .tari.rpc.AggregateBody body = 2;
    {PROTOBUF_FIELD_OFFSET(Block, _impl_.body_), _Internal::kHasBitsOffset + 1, 1,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  }}, {{
    {::_pbi::TcParser::GetTable<::tari::rpc::BlockHeader>()},
    {::_pbi::TcParser::GetTable<::tari::rpc::AggregateBody>()},
  }}, {{
  }},
};

::uint8_t* Block::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.Block)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .tari.rpc.BlockHeader header = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *_impl_.header_, _impl_.header_->GetCachedSize(), target, stream);
  }

  // .tari.rpc.AggregateBody body = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *_impl_.body_, _impl_.body_->GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.Block)
  return target;
}

::size_t Block::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.Block)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // .tari.rpc.BlockHeader header = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size +=
          1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_);
    }

    // .tari.rpc.AggregateBody body = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size +=
          1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.body_);
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void Block::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<Block*>(&to_msg);
  auto& from = static_cast<const Block&>(from_msg);
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.Block)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(from._impl_.header_ != nullptr);
      if (_this->_impl_.header_ == nullptr) {
        _this->_impl_.header_ =
            ::google::protobuf::Message::CopyConstruct<::tari::rpc::BlockHeader>(arena, *from._impl_.header_);
      } else {
        _this->_impl_.header_->MergeFrom(*from._impl_.header_);
      }
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(from._impl_.body_ != nullptr);
      if (_this->_impl_.body_ == nullptr) {
        _this->_impl_.body_ =
            ::google::protobuf::Message::CopyConstruct<::tari::rpc::AggregateBody>(arena, *from._impl_.body_);
      } else {
        _this->_impl_.body_->MergeFrom(*from._impl_.body_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void Block::CopyFrom(const Block& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.Block)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool Block::IsInitialized() const {
  return true;
}

void Block::InternalSwap(Block* PROTOBUF_RESTRICT other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Block, _impl_.body_)
      + sizeof(Block::_impl_.body_)
      - PROTOBUF_FIELD_OFFSET(Block, _impl_.header_)>(
          reinterpret_cast<char*>(&_impl_.header_),
          reinterpret_cast<char*>(&other->_impl_.header_));
}

::google::protobuf::Metadata Block::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[3]);
}
// ===================================================================

class HistoricalBlock::_Internal {
 public:
  using HasBits = decltype(std::declval<HistoricalBlock>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_._has_bits_);
};

HistoricalBlock::HistoricalBlock(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.HistoricalBlock)
}
inline PROTOBUF_NDEBUG_INLINE HistoricalBlock::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
    const Impl_& from)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

HistoricalBlock::HistoricalBlock(
    ::google::protobuf::Arena* arena,
    const HistoricalBlock& from)
    : ::google::protobuf::Message(arena) {
  HistoricalBlock* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.block_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::Block>(
                              arena, *from._impl_.block_)
                        : nullptr;
  _impl_.confirmations_ = from._impl_.confirmations_;

  // @@protoc_insertion_point(copy_constructor:tari.rpc.HistoricalBlock)
}
inline PROTOBUF_NDEBUG_INLINE HistoricalBlock::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : _cached_size_{0} {}

inline void HistoricalBlock::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, block_),
           0,
           offsetof(Impl_, confirmations_) -
               offsetof(Impl_, block_) +
               sizeof(Impl_::confirmations_));
}
HistoricalBlock::~HistoricalBlock() {
  // @@protoc_insertion_point(destructor:tari.rpc.HistoricalBlock)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void HistoricalBlock::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  delete _impl_.block_;
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
HistoricalBlock::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_._cached_size_),
              false,
          },
          &HistoricalBlock::MergeImpl,
          &HistoricalBlock::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void HistoricalBlock::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.HistoricalBlock)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.block_ != nullptr);
    _impl_.block_->Clear();
  }
  _impl_.confirmations_ = ::uint64_t{0u};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* HistoricalBlock::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 0, 2> HistoricalBlock::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    &_HistoricalBlock_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::HistoricalBlock>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // .tari.rpc.Block block = 2;
    {::_pbi::TcParser::FastMtS1,
     {18, 0, 0, PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_.block_)}},
    // uint64 confirmations = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(HistoricalBlock, _impl_.confirmations_), 63>(),
     {8, 63, 0, PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_.confirmations_)}},
  }}, {{
    65535, 65535
  }}, {{
    // uint64 confirmations = 1;
    {PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_.confirmations_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // .tari.rpc.Block block = 2;
    {PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_.block_), _Internal::kHasBitsOffset + 0, 0,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  }}, {{
    {::_pbi::TcParser::GetTable<::tari::rpc::Block>()},
  }}, {{
  }},
};

::uint8_t* HistoricalBlock::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.HistoricalBlock)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  // uint64 confirmations = 1;
  if (this->_internal_confirmations() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        1, this->_internal_confirmations(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .tari.rpc.Block block = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *_impl_.block_, _impl_.block_->GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.HistoricalBlock)
  return target;
}

::size_t HistoricalBlock::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.HistoricalBlock)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // .tari.rpc.Block block = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size +=
        1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.block_);
  }

  // uint64 confirmations = 1;
  if (this->_internal_confirmations() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_confirmations());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void HistoricalBlock::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<HistoricalBlock*>(&to_msg);
  auto& from = static_cast<const HistoricalBlock&>(from_msg);
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.HistoricalBlock)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(from._impl_.block_ != nullptr);
    if (_this->_impl_.block_ == nullptr) {
      _this->_impl_.block_ =
          ::google::protobuf::Message::CopyConstruct<::tari::rpc::Block>(arena, *from._impl_.block_);
    } else {
      _this->_impl_.block_->MergeFrom(*from._impl_.block_);
    }
  }
  if (from._internal_confirmations() != 0) {
    _this->_impl_.confirmations_ = from._impl_.confirmations_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void HistoricalBlock::CopyFrom(const HistoricalBlock& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.HistoricalBlock)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool HistoricalBlock::IsInitialized() const {
  return true;
}

void HistoricalBlock::InternalSwap(HistoricalBlock* PROTOBUF_RESTRICT other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_.confirmations_)
      + sizeof(HistoricalBlock::_impl_.confirmations_)
      - PROTOBUF_FIELD_OFFSET(HistoricalBlock, _impl_.block_)>(
          reinterpret_cast<char*>(&_impl_.block_),
          reinterpret_cast<char*>(&other->_impl_.block_));
}

::google::protobuf::Metadata HistoricalBlock::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[4]);
}
// ===================================================================

class NewBlockHeaderTemplate::_Internal {
 public:
  using HasBits = decltype(std::declval<NewBlockHeaderTemplate>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_._has_bits_);
};

NewBlockHeaderTemplate::NewBlockHeaderTemplate(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.NewBlockHeaderTemplate)
}
inline PROTOBUF_NDEBUG_INLINE NewBlockHeaderTemplate::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
    const Impl_& from)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        prev_hash_(arena, from.prev_hash_),
        total_kernel_offset_(arena, from.total_kernel_offset_),
        total_script_offset_(arena, from.total_script_offset_) {}

NewBlockHeaderTemplate::NewBlockHeaderTemplate(
    ::google::protobuf::Arena* arena,
    const NewBlockHeaderTemplate& from)
    : ::google::protobuf::Message(arena) {
  NewBlockHeaderTemplate* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.pow_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::ProofOfWork>(
                              arena, *from._impl_.pow_)
                        : nullptr;
  ::memcpy(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, height_),
           reinterpret_cast<const char *>(&from._impl_) +
               offsetof(Impl_, height_),
           offsetof(Impl_, version_) -
               offsetof(Impl_, height_) +
               sizeof(Impl_::version_));

  // @@protoc_insertion_point(copy_constructor:tari.rpc.NewBlockHeaderTemplate)
}
inline PROTOBUF_NDEBUG_INLINE NewBlockHeaderTemplate::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : _cached_size_{0},
        prev_hash_(arena),
        total_kernel_offset_(arena),
        total_script_offset_(arena) {}

inline void NewBlockHeaderTemplate::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, pow_),
           0,
           offsetof(Impl_, version_) -
               offsetof(Impl_, pow_) +
               sizeof(Impl_::version_));
}
NewBlockHeaderTemplate::~NewBlockHeaderTemplate() {
  // @@protoc_insertion_point(destructor:tari.rpc.NewBlockHeaderTemplate)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void NewBlockHeaderTemplate::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  _impl_.prev_hash_.Destroy();
  _impl_.total_kernel_offset_.Destroy();
  _impl_.total_script_offset_.Destroy();
  delete _impl_.pow_;
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
NewBlockHeaderTemplate::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_._cached_size_),
              false,
          },
          &NewBlockHeaderTemplate::MergeImpl,
          &NewBlockHeaderTemplate::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void NewBlockHeaderTemplate::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.NewBlockHeaderTemplate)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.prev_hash_.ClearToEmpty();
  _impl_.total_kernel_offset_.ClearToEmpty();
  _impl_.total_script_offset_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.pow_ != nullptr);
    _impl_.pow_->Clear();
  }
  ::memset(&_impl_.height_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.version_) -
      reinterpret_cast<char*>(&_impl_.height_)) + sizeof(_impl_.version_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* NewBlockHeaderTemplate::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 6, 1, 0, 2> NewBlockHeaderTemplate::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_._has_bits_),
    0, // no _extensions_
    7, 56,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967200,  // skipmap
    offsetof(decltype(_table_), field_entries),
    6,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    &_NewBlockHeaderTemplate_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::NewBlockHeaderTemplate>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
    // uint32 version = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(NewBlockHeaderTemplate, _impl_.version_), 63>(),
     {8, 63, 0, PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.version_)}},
    // uint64 height = 2;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(NewBlockHeaderTemplate, _impl_.height_), 63>(),
     {16, 63, 0, PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.height_)}},
    // bytes prev_hash = 3;
    {::_pbi::TcParser::FastBS1,
     {26, 63, 0, PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.prev_hash_)}},
    // bytes total_kernel_offset = 4;
    {::_pbi::TcParser::FastBS1,
     {34, 63, 0, PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.total_kernel_offset_)}},
    // .tari.rpc.ProofOfWork pow = 5;
    {::_pbi::TcParser::FastMtS1,
     {42, 0, 0, PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.pow_)}},
    {::_pbi::TcParser::MiniParse, {}},
    // bytes total_script_offset = 7;
    {::_pbi::TcParser::FastBS1,
     {58, 63, 0, PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.total_script_offset_)}},
  }}, {{
    65535, 65535
  }}, {{
    // uint32 version = 1;
    {PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.version_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
    // uint64 height = 2;
    {PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.height_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
    // bytes prev_hash = 3;
    {PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.prev_hash_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // bytes total_kernel_offset = 4;
    {PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.total_kernel_offset_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
    // .tari.rpc.ProofOfWork pow = 5;
    {PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.pow_), _Internal::kHasBitsOffset + 0, 0,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // bytes total_script_offset = 7;
    {PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.total_script_offset_), -1, 0,
    (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
  }}, {{
    {::_pbi::TcParser::GetTable<::tari::rpc::ProofOfWork>()},
  }}, {{
  }},
};

::uint8_t* NewBlockHeaderTemplate::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.NewBlockHeaderTemplate)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  // uint32 version = 1;
  if (this->_internal_version() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        1, this->_internal_version(), target);
  }

  // uint64 height = 2;
  if (this->_internal_height() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        2, this->_internal_height(), target);
  }

  // bytes prev_hash = 3;
  if (!this->_internal_prev_hash().empty()) {
    const std::string& _s = this->_internal_prev_hash();
    target = stream->WriteBytesMaybeAliased(3, _s, target);
  }

  // bytes total_kernel_offset = 4;
  if (!this->_internal_total_kernel_offset().empty()) {
    const std::string& _s = this->_internal_total_kernel_offset();
    target = stream->WriteBytesMaybeAliased(4, _s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .tari.rpc.ProofOfWork pow = 5;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        5, *_impl_.pow_, _impl_.pow_->GetCachedSize(), target, stream);
  }

  // bytes total_script_offset = 7;
  if (!this->_internal_total_script_offset().empty()) {
    const std::string& _s = this->_internal_total_script_offset();
    target = stream->WriteBytesMaybeAliased(7, _s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.NewBlockHeaderTemplate)
  return target;
}

::size_t NewBlockHeaderTemplate::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.NewBlockHeaderTemplate)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes prev_hash = 3;
  if (!this->_internal_prev_hash().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_prev_hash());
  }

  // bytes total_kernel_offset = 4;
  if (!this->_internal_total_kernel_offset().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_total_kernel_offset());
  }

  // bytes total_script_offset = 7;
  if (!this->_internal_total_script_offset().empty()) {
    total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                    this->_internal_total_script_offset());
  }

  // .tari.rpc.ProofOfWork pow = 5;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size +=
        1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.pow_);
  }

  // uint64 height = 2;
  if (this->_internal_height() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
        this->_internal_height());
  }

  // uint32 version = 1;
  if (this->_internal_version() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
        this->_internal_version());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void NewBlockHeaderTemplate::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<NewBlockHeaderTemplate*>(&to_msg);
  auto& from = static_cast<const NewBlockHeaderTemplate&>(from_msg);
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.NewBlockHeaderTemplate)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_prev_hash().empty()) {
    _this->_internal_set_prev_hash(from._internal_prev_hash());
  }
  if (!from._internal_total_kernel_offset().empty()) {
    _this->_internal_set_total_kernel_offset(from._internal_total_kernel_offset());
  }
  if (!from._internal_total_script_offset().empty()) {
    _this->_internal_set_total_script_offset(from._internal_total_script_offset());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(from._impl_.pow_ != nullptr);
    if (_this->_impl_.pow_ == nullptr) {
      _this->_impl_.pow_ =
          ::google::protobuf::Message::CopyConstruct<::tari::rpc::ProofOfWork>(arena, *from._impl_.pow_);
    } else {
      _this->_impl_.pow_->MergeFrom(*from._impl_.pow_);
    }
  }
  if (from._internal_height() != 0) {
    _this->_impl_.height_ = from._impl_.height_;
  }
  if (from._internal_version() != 0) {
    _this->_impl_.version_ = from._impl_.version_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void NewBlockHeaderTemplate::CopyFrom(const NewBlockHeaderTemplate& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.NewBlockHeaderTemplate)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool NewBlockHeaderTemplate::IsInitialized() const {
  return true;
}

void NewBlockHeaderTemplate::InternalSwap(NewBlockHeaderTemplate* PROTOBUF_RESTRICT other) {
  using std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.prev_hash_, &other->_impl_.prev_hash_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.total_kernel_offset_, &other->_impl_.total_kernel_offset_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.total_script_offset_, &other->_impl_.total_script_offset_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.version_)
      + sizeof(NewBlockHeaderTemplate::_impl_.version_)
      - PROTOBUF_FIELD_OFFSET(NewBlockHeaderTemplate, _impl_.pow_)>(
          reinterpret_cast<char*>(&_impl_.pow_),
          reinterpret_cast<char*>(&other->_impl_.pow_));
}

::google::protobuf::Metadata NewBlockHeaderTemplate::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[5]);
}
// ===================================================================

class NewBlockTemplate::_Internal {
 public:
  using HasBits = decltype(std::declval<NewBlockTemplate>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_._has_bits_);
};

void NewBlockTemplate::clear_body() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.body_ != nullptr) _impl_.body_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
NewBlockTemplate::NewBlockTemplate(::google::protobuf::Arena* arena)
    : ::google::protobuf::Message(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:tari.rpc.NewBlockTemplate)
}
inline PROTOBUF_NDEBUG_INLINE NewBlockTemplate::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
    const Impl_& from)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

NewBlockTemplate::NewBlockTemplate(
    ::google::protobuf::Arena* arena,
    const NewBlockTemplate& from)
    : ::google::protobuf::Message(arena) {
  NewBlockTemplate* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.header_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::NewBlockHeaderTemplate>(
                              arena, *from._impl_.header_)
                        : nullptr;
  _impl_.body_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::AggregateBody>(
                              arena, *from._impl_.body_)
                        : nullptr;

  // @@protoc_insertion_point(copy_constructor:tari.rpc.NewBlockTemplate)
}
inline PROTOBUF_NDEBUG_INLINE NewBlockTemplate::Impl_::Impl_(
    ::google::protobuf::internal::InternalVisibility visibility,
    ::google::protobuf::Arena* arena)
      : _cached_size_{0} {}

inline void NewBlockTemplate::SharedCtor(::_pb::Arena* arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char *>(&_impl_) +
               offsetof(Impl_, header_),
           0,
           offsetof(Impl_, body_) -
               offsetof(Impl_, header_) +
               sizeof(Impl_::body_));
}
NewBlockTemplate::~NewBlockTemplate() {
  // @@protoc_insertion_point(destructor:tari.rpc.NewBlockTemplate)
  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  SharedDtor();
}
inline void NewBlockTemplate::SharedDtor() {
  ABSL_DCHECK(GetArena() == nullptr);
  delete _impl_.header_;
  delete _impl_.body_;
  _impl_.~Impl_();
}

const ::google::protobuf::MessageLite::ClassData*
NewBlockTemplate::GetClassData() const {
  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
      ClassDataFull _data_ = {
          {
              nullptr,  // OnDemandRegisterArenaDtor
              PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_._cached_size_),
              false,
          },
          &NewBlockTemplate::MergeImpl,
          &NewBlockTemplate::kDescriptorMethods,
      };
  return &_data_;
}
PROTOBUF_NOINLINE void NewBlockTemplate::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.NewBlockTemplate)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.header_ != nullptr);
      _impl_.header_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.body_ != nullptr);
      _impl_.body_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

const char* NewBlockTemplate::_InternalParse(
    const char* ptr, ::_pbi::ParseContext* ctx) {
  ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  return ptr;
}


PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 2, 0, 2> NewBlockTemplate::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    2,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    &_NewBlockTemplate_default_instance_._instance,
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::tari::rpc::NewBlockTemplate>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // .tari.rpc.AggregateBody body = 2;
    {::_pbi::TcParser::FastMtS1,
     {18, 1, 1, PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_)}},
    // .tari.rpc.NewBlockHeaderTemplate header = 1;
    {::_pbi::TcParser::FastMtS1,
     {10, 0, 0, PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.header_)}},
  }}, {{
    65535, 65535
  }}, {{
    // .tari.rpc.NewBlockHeaderTemplate header = 1;
    {PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.header_), _Internal::kHasBitsOffset + 0, 0,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // .tari.rpc.AggregateBody body = 2;
    {PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_), _Internal::kHasBitsOffset + 1, 1,
    (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  }}, {{
    {::_pbi::TcParser::GetTable<::tari::rpc::NewBlockHeaderTemplate>()},
    {::_pbi::TcParser::GetTable<::tari::rpc::AggregateBody>()},
  }}, {{
  }},
};

::uint8_t* NewBlockTemplate::_InternalSerialize(
    ::uint8_t* target,
    ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.NewBlockTemplate)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .tari.rpc.NewBlockHeaderTemplate header = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *_impl_.header_, _impl_.header_->GetCachedSize(), target, stream);
  }

  // .tari.rpc.AggregateBody body = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *_impl_.body_, _impl_.body_->GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.NewBlockTemplate)
  return target;
}

::size_t NewBlockTemplate::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.NewBlockTemplate)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // .tari.rpc.NewBlockHeaderTemplate header = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size +=
          1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_);
    }

    // .tari.rpc.AggregateBody body = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size +=
          1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.body_);
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}


void NewBlockTemplate::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  auto* const _this = static_cast<NewBlockTemplate*>(&to_msg);
  auto& from = static_cast<const NewBlockTemplate&>(from_msg);
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.NewBlockTemplate)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(from._impl_.header_ != nullptr);
      if (_this->_impl_.header_ == nullptr) {
        _this->_impl_.header_ =
            ::google::protobuf::Message::CopyConstruct<::tari::rpc::NewBlockHeaderTemplate>(arena, *from._impl_.header_);
      } else {
        _this->_impl_.header_->MergeFrom(*from._impl_.header_);
      }
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(from._impl_.body_ != nullptr);
      if (_this->_impl_.body_ == nullptr) {
        _this->_impl_.body_ =
            ::google::protobuf::Message::CopyConstruct<::tari::rpc::AggregateBody>(arena, *from._impl_.body_);
      } else {
        _this->_impl_.body_->MergeFrom(*from._impl_.body_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void NewBlockTemplate::CopyFrom(const NewBlockTemplate& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.NewBlockTemplate)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool NewBlockTemplate::IsInitialized() const {
  return true;
}

void NewBlockTemplate::InternalSwap(NewBlockTemplate* PROTOBUF_RESTRICT other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_)
      + sizeof(NewBlockTemplate::_impl_.body_)
      - PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.header_)>(
          reinterpret_cast<char*>(&_impl_.header_),
          reinterpret_cast<char*>(&other->_impl_.header_));
}

::google::protobuf::Metadata NewBlockTemplate::GetMetadata() const {
  return ::_pbi::AssignDescriptors(&descriptor_table_block_2eproto_getter,
                                   &descriptor_table_block_2eproto_once,
                                   file_level_metadata_block_2eproto[6]);
}
// @@protoc_insertion_point(namespace_scope)
}  // namespace rpc
}  // namespace tari
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
static ::std::false_type _static_init_ PROTOBUF_UNUSED =
    (::_pbi::AddDescriptors(&descriptor_table_block_2eproto),
     ::std::false_type{});
#include "google/protobuf/port_undef.inc"
