com.wavesplatform.protobuf.block.Block.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.wavesplatform.protobuf.block
@SerialVersionUID(0L)
final case class Block(
header: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header] = _root_.scala.None,
signature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
transactions: _root_.scala.Seq[com.wavesplatform.protobuf.transaction.SignedTransaction] = _root_.scala.Seq.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Block] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (header.isDefined) {
val __value = header.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = signature
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value)
}
};
transactions.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
header.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = signature
if (!__v.isEmpty) {
_output__.writeBytes(2, __v)
}
};
transactions.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getHeader: com.wavesplatform.protobuf.block.Block.Header = header.getOrElse(com.wavesplatform.protobuf.block.Block.Header.defaultInstance)
def clearHeader: Block = copy(header = _root_.scala.None)
def withHeader(__v: com.wavesplatform.protobuf.block.Block.Header): Block = copy(header = Option(__v))
def withSignature(__v: _root_.com.google.protobuf.ByteString): Block = copy(signature = __v)
def clearTransactions = copy(transactions = _root_.scala.Seq.empty)
def addTransactions(__vs: com.wavesplatform.protobuf.transaction.SignedTransaction *): Block = addAllTransactions(__vs)
def addAllTransactions(__vs: Iterable[com.wavesplatform.protobuf.transaction.SignedTransaction]): Block = copy(transactions = transactions ++ __vs)
def withTransactions(__v: _root_.scala.Seq[com.wavesplatform.protobuf.transaction.SignedTransaction]): Block = copy(transactions = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => header.orNull
case 2 => {
val __t = signature
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 3 => transactions
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => header.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => _root_.scalapb.descriptors.PByteString(signature)
case 3 => _root_.scalapb.descriptors.PRepeated(transactions.iterator.map(_.toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.protobuf.block.Block.type = com.wavesplatform.protobuf.block.Block
// @@protoc_insertion_point(GeneratedMessage[waves.Block])
}
object Block extends scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.block.Block] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.block.Block] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.protobuf.block.Block = {
var __header: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header] = _root_.scala.None
var __signature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
val __transactions: _root_.scala.collection.immutable.VectorBuilder[com.wavesplatform.protobuf.transaction.SignedTransaction] = new _root_.scala.collection.immutable.VectorBuilder[com.wavesplatform.protobuf.transaction.SignedTransaction]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__header = _root_.scala.Option(__header.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.block.Block.Header](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__signature = _input__.readBytes()
case 26 =>
__transactions += _root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.transaction.SignedTransaction](_input__)
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.protobuf.block.Block(
header = __header,
signature = __signature,
transactions = __transactions.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.protobuf.block.Block] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.wavesplatform.protobuf.block.Block(
header = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header]]),
signature = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
transactions = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[com.wavesplatform.protobuf.transaction.SignedTransaction]]).getOrElse(_root_.scala.Seq.empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = BlockProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = BlockProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = com.wavesplatform.protobuf.block.Block.Header
case 3 => __out = com.wavesplatform.protobuf.transaction.SignedTransaction
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.com.wavesplatform.protobuf.block.Block.Header
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.wavesplatform.protobuf.block.Block(
header = _root_.scala.None,
signature = _root_.com.google.protobuf.ByteString.EMPTY,
transactions = _root_.scala.Seq.empty
)
@SerialVersionUID(0L)
final case class Header(
chainId: _root_.scala.Int = 0,
reference: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
baseTarget: _root_.scala.Long = 0L,
generationSignature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
featureVotes: _root_.scala.Seq[_root_.scala.Int] = _root_.scala.Seq.empty,
timestamp: _root_.scala.Long = 0L,
version: _root_.scala.Int = 0,
generator: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
rewardVote: _root_.scala.Long = 0L,
transactionsRoot: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
stateHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
challengedHeader: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Header] {
private[this] def featureVotesSerializedSize = {
if (__featureVotesSerializedSizeField == 0) __featureVotesSerializedSizeField = {
var __s: _root_.scala.Int = 0
featureVotes.foreach(__i => __s += _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__i))
__s
}
__featureVotesSerializedSizeField
}
@transient private[this] var __featureVotesSerializedSizeField: _root_.scala.Int = 0
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = chainId
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(1, __value)
}
};
{
val __value = reference
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value)
}
};
{
val __value = baseTarget
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
}
};
{
val __value = generationSignature
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(4, __value)
}
};
if (featureVotes.nonEmpty) {
val __localsize = featureVotesSerializedSize
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__localsize) + __localsize
}
{
val __value = timestamp
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
{
val __value = version
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(7, __value)
}
};
{
val __value = generator
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(8, __value)
}
};
{
val __value = rewardVote
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(9, __value)
}
};
{
val __value = transactionsRoot
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(10, __value)
}
};
{
val __value = stateHash
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(11, __value)
}
};
if (challengedHeader.isDefined) {
val __value = challengedHeader.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = chainId
if (__v != 0) {
_output__.writeInt32(1, __v)
}
};
{
val __v = reference
if (!__v.isEmpty) {
_output__.writeBytes(2, __v)
}
};
{
val __v = baseTarget
if (__v != 0L) {
_output__.writeInt64(3, __v)
}
};
{
val __v = generationSignature
if (!__v.isEmpty) {
_output__.writeBytes(4, __v)
}
};
if (featureVotes.nonEmpty) {
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(featureVotesSerializedSize)
featureVotes.foreach(_output__.writeUInt32NoTag)
};
{
val __v = timestamp
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
{
val __v = version
if (__v != 0) {
_output__.writeInt32(7, __v)
}
};
{
val __v = generator
if (!__v.isEmpty) {
_output__.writeBytes(8, __v)
}
};
{
val __v = rewardVote
if (__v != 0L) {
_output__.writeInt64(9, __v)
}
};
{
val __v = transactionsRoot
if (!__v.isEmpty) {
_output__.writeBytes(10, __v)
}
};
{
val __v = stateHash
if (!__v.isEmpty) {
_output__.writeBytes(11, __v)
}
};
challengedHeader.foreach { __v =>
val __m = __v
_output__.writeTag(12, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withChainId(__v: _root_.scala.Int): Header = copy(chainId = __v)
def withReference(__v: _root_.com.google.protobuf.ByteString): Header = copy(reference = __v)
def withBaseTarget(__v: _root_.scala.Long): Header = copy(baseTarget = __v)
def withGenerationSignature(__v: _root_.com.google.protobuf.ByteString): Header = copy(generationSignature = __v)
def clearFeatureVotes = copy(featureVotes = _root_.scala.Seq.empty)
def addFeatureVotes(__vs: _root_.scala.Int *): Header = addAllFeatureVotes(__vs)
def addAllFeatureVotes(__vs: Iterable[_root_.scala.Int]): Header = copy(featureVotes = featureVotes ++ __vs)
def withFeatureVotes(__v: _root_.scala.Seq[_root_.scala.Int]): Header = copy(featureVotes = __v)
def withTimestamp(__v: _root_.scala.Long): Header = copy(timestamp = __v)
def withVersion(__v: _root_.scala.Int): Header = copy(version = __v)
def withGenerator(__v: _root_.com.google.protobuf.ByteString): Header = copy(generator = __v)
def withRewardVote(__v: _root_.scala.Long): Header = copy(rewardVote = __v)
def withTransactionsRoot(__v: _root_.com.google.protobuf.ByteString): Header = copy(transactionsRoot = __v)
def withStateHash(__v: _root_.com.google.protobuf.ByteString): Header = copy(stateHash = __v)
def getChallengedHeader: com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader = challengedHeader.getOrElse(com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader.defaultInstance)
def clearChallengedHeader: Header = copy(challengedHeader = _root_.scala.None)
def withChallengedHeader(__v: com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader): Header = copy(challengedHeader = Option(__v))
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = chainId
if (__t != 0) __t else null
}
case 2 => {
val __t = reference
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 3 => {
val __t = baseTarget
if (__t != 0L) __t else null
}
case 4 => {
val __t = generationSignature
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 5 => featureVotes
case 6 => {
val __t = timestamp
if (__t != 0L) __t else null
}
case 7 => {
val __t = version
if (__t != 0) __t else null
}
case 8 => {
val __t = generator
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 9 => {
val __t = rewardVote
if (__t != 0L) __t else null
}
case 10 => {
val __t = transactionsRoot
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 11 => {
val __t = stateHash
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 12 => challengedHeader.orNull
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PInt(chainId)
case 2 => _root_.scalapb.descriptors.PByteString(reference)
case 3 => _root_.scalapb.descriptors.PLong(baseTarget)
case 4 => _root_.scalapb.descriptors.PByteString(generationSignature)
case 5 => _root_.scalapb.descriptors.PRepeated(featureVotes.iterator.map(_root_.scalapb.descriptors.PInt(_)).toVector)
case 6 => _root_.scalapb.descriptors.PLong(timestamp)
case 7 => _root_.scalapb.descriptors.PInt(version)
case 8 => _root_.scalapb.descriptors.PByteString(generator)
case 9 => _root_.scalapb.descriptors.PLong(rewardVote)
case 10 => _root_.scalapb.descriptors.PByteString(transactionsRoot)
case 11 => _root_.scalapb.descriptors.PByteString(stateHash)
case 12 => challengedHeader.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.protobuf.block.Block.Header.type = com.wavesplatform.protobuf.block.Block.Header
// @@protoc_insertion_point(GeneratedMessage[waves.Block.Header])
}
object Header extends scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.block.Block.Header] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.block.Block.Header] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.protobuf.block.Block.Header = {
var __chainId: _root_.scala.Int = 0
var __reference: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __baseTarget: _root_.scala.Long = 0L
var __generationSignature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
val __featureVotes: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Int] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Int]
var __timestamp: _root_.scala.Long = 0L
var __version: _root_.scala.Int = 0
var __generator: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __rewardVote: _root_.scala.Long = 0L
var __transactionsRoot: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __stateHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __challengedHeader: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader] = _root_.scala.None
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__chainId = _input__.readInt32()
case 18 =>
__reference = _input__.readBytes()
case 24 =>
__baseTarget = _input__.readInt64()
case 34 =>
__generationSignature = _input__.readBytes()
case 40 =>
__featureVotes += _input__.readUInt32()
case 42 => {
val length = _input__.readRawVarint32()
val oldLimit = _input__.pushLimit(length)
while (_input__.getBytesUntilLimit > 0) {
__featureVotes += _input__.readUInt32()
}
_input__.popLimit(oldLimit)
}
case 48 =>
__timestamp = _input__.readInt64()
case 56 =>
__version = _input__.readInt32()
case 66 =>
__generator = _input__.readBytes()
case 72 =>
__rewardVote = _input__.readInt64()
case 82 =>
__transactionsRoot = _input__.readBytes()
case 90 =>
__stateHash = _input__.readBytes()
case 98 =>
__challengedHeader = _root_.scala.Option(__challengedHeader.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.protobuf.block.Block.Header(
chainId = __chainId,
reference = __reference,
baseTarget = __baseTarget,
generationSignature = __generationSignature,
featureVotes = __featureVotes.result(),
timestamp = __timestamp,
version = __version,
generator = __generator,
rewardVote = __rewardVote,
transactionsRoot = __transactionsRoot,
stateHash = __stateHash,
challengedHeader = __challengedHeader,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.protobuf.block.Block.Header] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.wavesplatform.protobuf.block.Block.Header(
chainId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0),
reference = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
baseTarget = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
generationSignature = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
featureVotes = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[_root_.scala.Int]]).getOrElse(_root_.scala.Seq.empty),
timestamp = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Int]).getOrElse(0),
generator = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
rewardVote = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
transactionsRoot = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
stateHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
challengedHeader = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.wavesplatform.protobuf.block.Block.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.wavesplatform.protobuf.block.Block.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 12 => __out = com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.wavesplatform.protobuf.block.Block.Header(
chainId = 0,
reference = _root_.com.google.protobuf.ByteString.EMPTY,
baseTarget = 0L,
generationSignature = _root_.com.google.protobuf.ByteString.EMPTY,
featureVotes = _root_.scala.Seq.empty,
timestamp = 0L,
version = 0,
generator = _root_.com.google.protobuf.ByteString.EMPTY,
rewardVote = 0L,
transactionsRoot = _root_.com.google.protobuf.ByteString.EMPTY,
stateHash = _root_.com.google.protobuf.ByteString.EMPTY,
challengedHeader = _root_.scala.None
)
@SerialVersionUID(0L)
final case class ChallengedHeader(
baseTarget: _root_.scala.Long = 0L,
generationSignature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
featureVotes: _root_.scala.Seq[_root_.scala.Int] = _root_.scala.Seq.empty,
timestamp: _root_.scala.Long = 0L,
generator: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
rewardVote: _root_.scala.Long = 0L,
stateHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
headerSignature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ChallengedHeader] {
private[this] def featureVotesSerializedSize = {
if (__featureVotesSerializedSizeField == 0) __featureVotesSerializedSizeField = {
var __s: _root_.scala.Int = 0
featureVotes.foreach(__i => __s += _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__i))
__s
}
__featureVotesSerializedSizeField
}
@transient private[this] var __featureVotesSerializedSizeField: _root_.scala.Int = 0
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = baseTarget
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(1, __value)
}
};
{
val __value = generationSignature
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value)
}
};
if (featureVotes.nonEmpty) {
val __localsize = featureVotesSerializedSize
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__localsize) + __localsize
}
{
val __value = timestamp
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(4, __value)
}
};
{
val __value = generator
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(5, __value)
}
};
{
val __value = rewardVote
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
{
val __value = stateHash
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(7, __value)
}
};
{
val __value = headerSignature
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(8, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = baseTarget
if (__v != 0L) {
_output__.writeInt64(1, __v)
}
};
{
val __v = generationSignature
if (!__v.isEmpty) {
_output__.writeBytes(2, __v)
}
};
if (featureVotes.nonEmpty) {
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(featureVotesSerializedSize)
featureVotes.foreach(_output__.writeUInt32NoTag)
};
{
val __v = timestamp
if (__v != 0L) {
_output__.writeInt64(4, __v)
}
};
{
val __v = generator
if (!__v.isEmpty) {
_output__.writeBytes(5, __v)
}
};
{
val __v = rewardVote
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
{
val __v = stateHash
if (!__v.isEmpty) {
_output__.writeBytes(7, __v)
}
};
{
val __v = headerSignature
if (!__v.isEmpty) {
_output__.writeBytes(8, __v)
}
};
unknownFields.writeTo(_output__)
}
def withBaseTarget(__v: _root_.scala.Long): ChallengedHeader = copy(baseTarget = __v)
def withGenerationSignature(__v: _root_.com.google.protobuf.ByteString): ChallengedHeader = copy(generationSignature = __v)
def clearFeatureVotes = copy(featureVotes = _root_.scala.Seq.empty)
def addFeatureVotes(__vs: _root_.scala.Int *): ChallengedHeader = addAllFeatureVotes(__vs)
def addAllFeatureVotes(__vs: Iterable[_root_.scala.Int]): ChallengedHeader = copy(featureVotes = featureVotes ++ __vs)
def withFeatureVotes(__v: _root_.scala.Seq[_root_.scala.Int]): ChallengedHeader = copy(featureVotes = __v)
def withTimestamp(__v: _root_.scala.Long): ChallengedHeader = copy(timestamp = __v)
def withGenerator(__v: _root_.com.google.protobuf.ByteString): ChallengedHeader = copy(generator = __v)
def withRewardVote(__v: _root_.scala.Long): ChallengedHeader = copy(rewardVote = __v)
def withStateHash(__v: _root_.com.google.protobuf.ByteString): ChallengedHeader = copy(stateHash = __v)
def withHeaderSignature(__v: _root_.com.google.protobuf.ByteString): ChallengedHeader = copy(headerSignature = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = baseTarget
if (__t != 0L) __t else null
}
case 2 => {
val __t = generationSignature
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 3 => featureVotes
case 4 => {
val __t = timestamp
if (__t != 0L) __t else null
}
case 5 => {
val __t = generator
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 6 => {
val __t = rewardVote
if (__t != 0L) __t else null
}
case 7 => {
val __t = stateHash
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 8 => {
val __t = headerSignature
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PLong(baseTarget)
case 2 => _root_.scalapb.descriptors.PByteString(generationSignature)
case 3 => _root_.scalapb.descriptors.PRepeated(featureVotes.iterator.map(_root_.scalapb.descriptors.PInt(_)).toVector)
case 4 => _root_.scalapb.descriptors.PLong(timestamp)
case 5 => _root_.scalapb.descriptors.PByteString(generator)
case 6 => _root_.scalapb.descriptors.PLong(rewardVote)
case 7 => _root_.scalapb.descriptors.PByteString(stateHash)
case 8 => _root_.scalapb.descriptors.PByteString(headerSignature)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader.type = com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader
// @@protoc_insertion_point(GeneratedMessage[waves.Block.Header.ChallengedHeader])
}
object ChallengedHeader extends scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader = {
var __baseTarget: _root_.scala.Long = 0L
var __generationSignature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
val __featureVotes: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Int] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Int]
var __timestamp: _root_.scala.Long = 0L
var __generator: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __rewardVote: _root_.scala.Long = 0L
var __stateHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __headerSignature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__baseTarget = _input__.readInt64()
case 18 =>
__generationSignature = _input__.readBytes()
case 24 =>
__featureVotes += _input__.readUInt32()
case 26 => {
val length = _input__.readRawVarint32()
val oldLimit = _input__.pushLimit(length)
while (_input__.getBytesUntilLimit > 0) {
__featureVotes += _input__.readUInt32()
}
_input__.popLimit(oldLimit)
}
case 32 =>
__timestamp = _input__.readInt64()
case 42 =>
__generator = _input__.readBytes()
case 48 =>
__rewardVote = _input__.readInt64()
case 58 =>
__stateHash = _input__.readBytes()
case 66 =>
__headerSignature = _input__.readBytes()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader(
baseTarget = __baseTarget,
generationSignature = __generationSignature,
featureVotes = __featureVotes.result(),
timestamp = __timestamp,
generator = __generator,
rewardVote = __rewardVote,
stateHash = __stateHash,
headerSignature = __headerSignature,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader(
baseTarget = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
generationSignature = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
featureVotes = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[_root_.scala.Int]]).getOrElse(_root_.scala.Seq.empty),
timestamp = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
generator = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
rewardVote = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
stateHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
headerSignature = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.wavesplatform.protobuf.block.Block.Header.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.wavesplatform.protobuf.block.Block.Header.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader(
baseTarget = 0L,
generationSignature = _root_.com.google.protobuf.ByteString.EMPTY,
featureVotes = _root_.scala.Seq.empty,
timestamp = 0L,
generator = _root_.com.google.protobuf.ByteString.EMPTY,
rewardVote = 0L,
stateHash = _root_.com.google.protobuf.ByteString.EMPTY,
headerSignature = _root_.com.google.protobuf.ByteString.EMPTY
)
implicit class ChallengedHeaderLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader](_l) {
def baseTarget: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.baseTarget)((c_, f_) => c_.copy(baseTarget = f_))
def generationSignature: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.generationSignature)((c_, f_) => c_.copy(generationSignature = f_))
def featureVotes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Int]] = field(_.featureVotes)((c_, f_) => c_.copy(featureVotes = f_))
def timestamp: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.timestamp)((c_, f_) => c_.copy(timestamp = f_))
def generator: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.generator)((c_, f_) => c_.copy(generator = f_))
def rewardVote: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.rewardVote)((c_, f_) => c_.copy(rewardVote = f_))
def stateHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.stateHash)((c_, f_) => c_.copy(stateHash = f_))
def headerSignature: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.headerSignature)((c_, f_) => c_.copy(headerSignature = f_))
}
final val BASE_TARGET_FIELD_NUMBER = 1
final val GENERATION_SIGNATURE_FIELD_NUMBER = 2
final val FEATURE_VOTES_FIELD_NUMBER = 3
final val TIMESTAMP_FIELD_NUMBER = 4
final val GENERATOR_FIELD_NUMBER = 5
final val REWARD_VOTE_FIELD_NUMBER = 6
final val STATE_HASH_FIELD_NUMBER = 7
final val HEADER_SIGNATURE_FIELD_NUMBER = 8
def of(
baseTarget: _root_.scala.Long,
generationSignature: _root_.com.google.protobuf.ByteString,
featureVotes: _root_.scala.Seq[_root_.scala.Int],
timestamp: _root_.scala.Long,
generator: _root_.com.google.protobuf.ByteString,
rewardVote: _root_.scala.Long,
stateHash: _root_.com.google.protobuf.ByteString,
headerSignature: _root_.com.google.protobuf.ByteString
): _root_.com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader = _root_.com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader(
baseTarget,
generationSignature,
featureVotes,
timestamp,
generator,
rewardVote,
stateHash,
headerSignature
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.Block.Header.ChallengedHeader])
}
implicit class HeaderLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.block.Block.Header]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.protobuf.block.Block.Header](_l) {
def chainId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.chainId)((c_, f_) => c_.copy(chainId = f_))
def reference: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.reference)((c_, f_) => c_.copy(reference = f_))
def baseTarget: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.baseTarget)((c_, f_) => c_.copy(baseTarget = f_))
def generationSignature: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.generationSignature)((c_, f_) => c_.copy(generationSignature = f_))
def featureVotes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Int]] = field(_.featureVotes)((c_, f_) => c_.copy(featureVotes = f_))
def timestamp: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.timestamp)((c_, f_) => c_.copy(timestamp = f_))
def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.version)((c_, f_) => c_.copy(version = f_))
def generator: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.generator)((c_, f_) => c_.copy(generator = f_))
def rewardVote: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.rewardVote)((c_, f_) => c_.copy(rewardVote = f_))
def transactionsRoot: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.transactionsRoot)((c_, f_) => c_.copy(transactionsRoot = f_))
def stateHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.stateHash)((c_, f_) => c_.copy(stateHash = f_))
def challengedHeader: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader] = field(_.getChallengedHeader)((c_, f_) => c_.copy(challengedHeader = _root_.scala.Option(f_)))
def optionalChallengedHeader: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader]] = field(_.challengedHeader)((c_, f_) => c_.copy(challengedHeader = f_))
}
final val CHAIN_ID_FIELD_NUMBER = 1
final val REFERENCE_FIELD_NUMBER = 2
final val BASE_TARGET_FIELD_NUMBER = 3
final val GENERATION_SIGNATURE_FIELD_NUMBER = 4
final val FEATURE_VOTES_FIELD_NUMBER = 5
final val TIMESTAMP_FIELD_NUMBER = 6
final val VERSION_FIELD_NUMBER = 7
final val GENERATOR_FIELD_NUMBER = 8
final val REWARD_VOTE_FIELD_NUMBER = 9
final val TRANSACTIONS_ROOT_FIELD_NUMBER = 10
final val STATE_HASH_FIELD_NUMBER = 11
final val CHALLENGED_HEADER_FIELD_NUMBER = 12
def of(
chainId: _root_.scala.Int,
reference: _root_.com.google.protobuf.ByteString,
baseTarget: _root_.scala.Long,
generationSignature: _root_.com.google.protobuf.ByteString,
featureVotes: _root_.scala.Seq[_root_.scala.Int],
timestamp: _root_.scala.Long,
version: _root_.scala.Int,
generator: _root_.com.google.protobuf.ByteString,
rewardVote: _root_.scala.Long,
transactionsRoot: _root_.com.google.protobuf.ByteString,
stateHash: _root_.com.google.protobuf.ByteString,
challengedHeader: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header.ChallengedHeader]
): _root_.com.wavesplatform.protobuf.block.Block.Header = _root_.com.wavesplatform.protobuf.block.Block.Header(
chainId,
reference,
baseTarget,
generationSignature,
featureVotes,
timestamp,
version,
generator,
rewardVote,
transactionsRoot,
stateHash,
challengedHeader
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.Block.Header])
}
implicit class BlockLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.block.Block]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.protobuf.block.Block](_l) {
def header: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.block.Block.Header] = field(_.getHeader)((c_, f_) => c_.copy(header = _root_.scala.Option(f_)))
def optionalHeader: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header]] = field(_.header)((c_, f_) => c_.copy(header = f_))
def signature: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.signature)((c_, f_) => c_.copy(signature = f_))
def transactions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[com.wavesplatform.protobuf.transaction.SignedTransaction]] = field(_.transactions)((c_, f_) => c_.copy(transactions = f_))
}
final val HEADER_FIELD_NUMBER = 1
final val SIGNATURE_FIELD_NUMBER = 2
final val TRANSACTIONS_FIELD_NUMBER = 3
def of(
header: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header],
signature: _root_.com.google.protobuf.ByteString,
transactions: _root_.scala.Seq[com.wavesplatform.protobuf.transaction.SignedTransaction]
): _root_.com.wavesplatform.protobuf.block.Block = _root_.com.wavesplatform.protobuf.block.Block(
header,
signature,
transactions
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.Block])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy