public static final class XchainOuterClass.InternalBlock extends com.google.protobuf.GeneratedMessageLite<XchainOuterClass.InternalBlock,XchainOuterClass.InternalBlock.Builder> implements XchainOuterClass.InternalBlockOrBuilder
The internal block struct
Protobuf type pb.InternalBlock
| 限定符和类型 | 类和说明 |
|---|---|
static class |
XchainOuterClass.InternalBlock.Builder
The internal block struct
Protobuf type
pb.InternalBlock |
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MergeFromVisitor, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm, com.google.protobuf.GeneratedMessageLite.Visitor| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BLOCKID_FIELD_NUMBER |
static int |
CURBLOCKNUM_FIELD_NUMBER |
static int |
CURTERM_FIELD_NUMBER |
static int |
FAILED_TXS_FIELD_NUMBER |
static int |
HEIGHT_FIELD_NUMBER |
static int |
IN_TRUNK_FIELD_NUMBER |
static int |
JUSTIFY_FIELD_NUMBER |
static int |
MERKLE_ROOT_FIELD_NUMBER |
static int |
MERKLE_TREE_FIELD_NUMBER |
static int |
NEXT_HASH_FIELD_NUMBER |
static int |
NONCE_FIELD_NUMBER |
static int |
PRE_HASH_FIELD_NUMBER |
static int |
PROPOSER_FIELD_NUMBER |
static int |
PUBKEY_FIELD_NUMBER |
static int |
SIGN_FIELD_NUMBER |
static int |
TARGETBITS_FIELD_NUMBER |
static int |
TIMESTAMP_FIELD_NUMBER |
static int |
TRANSACTIONS_FIELD_NUMBER |
static int |
TX_COUNT_FIELD_NUMBER |
static int |
VERSION_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
containsFailedTxs(String key)
txid -> failed reason
map<string, string> failed_txs = 18; |
protected Object |
dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0,
Object arg1) |
com.google.protobuf.ByteString |
getBlockid()
blockid generate the hash sign of the block used by sha256
optional bytes blockid = 3; |
long |
getCurBlockNum()
optional int64 curBlockNum = 17; |
long |
getCurTerm()
optional int64 curTerm = 16; |
static XchainOuterClass.InternalBlock |
getDefaultInstance() |
Map<String,String> |
getFailedTxs()
已过时。
|
int |
getFailedTxsCount()
txid -> failed reason
map<string, string> failed_txs = 18; |
Map<String,String> |
getFailedTxsMap()
txid -> failed reason
map<string, string> failed_txs = 18; |
String |
getFailedTxsOrDefault(String key,
String defaultValue)
txid -> failed reason
map<string, string> failed_txs = 18; |
String |
getFailedTxsOrThrow(String key)
txid -> failed reason
map<string, string> failed_txs = 18; |
long |
getHeight()
The height of the blockchain
optional int64 height = 9; |
boolean |
getInTrunk()
下面的属性会动态变化
If the block is on the trunk
optional bool in_trunk = 14; |
Chainedbft.QuorumCert |
getJustify()
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20; |
com.google.protobuf.ByteString |
getMerkleRoot()
The Merkle Tree root
optional bytes merkle_root = 8; |
com.google.protobuf.ByteString |
getMerkleTree(int index)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
int |
getMerkleTreeCount()
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
List<com.google.protobuf.ByteString> |
getMerkleTreeList()
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
com.google.protobuf.ByteString |
getNextHash()
Next next block which on trunk
optional bytes next_hash = 15; |
int |
getNonce()
Random number used to avoid replay attacks
optional int32 nonce = 2; |
com.google.protobuf.ByteString |
getPreHash()
pre_hash is the parent blockid of the block
optional bytes pre_hash = 4; |
com.google.protobuf.ByteString |
getProposer()
The miner id
optional bytes proposer = 5; |
com.google.protobuf.ByteString |
getPubkey()
The pk of the miner
optional bytes pubkey = 7; |
int |
getSerializedSize() |
com.google.protobuf.ByteString |
getSign()
The sign which miner signed: blockid + nonce + timestamp
optional bytes sign = 6; |
int |
getTargetBits()
optional int32 targetBits = 19; |
long |
getTimestamp()
Timestamp of the block
optional int64 timestamp = 10; |
XchainOuterClass.Transaction |
getTransactions(int index)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
int |
getTransactionsCount()
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
List<XchainOuterClass.Transaction> |
getTransactionsList()
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.TransactionOrBuilder |
getTransactionsOrBuilder(int index)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
List<? extends XchainOuterClass.TransactionOrBuilder> |
getTransactionsOrBuilderList()
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
int |
getTxCount()
The transaction count of the block
optional int32 tx_count = 12; |
int |
getVersion()
block version
optional int32 version = 1; |
boolean |
hasJustify()
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20; |
static XchainOuterClass.InternalBlock.Builder |
newBuilder() |
static XchainOuterClass.InternalBlock.Builder |
newBuilder(XchainOuterClass.InternalBlock prototype) |
static XchainOuterClass.InternalBlock |
parseDelimitedFrom(InputStream input) |
static XchainOuterClass.InternalBlock |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static XchainOuterClass.InternalBlock |
parseFrom(byte[] data) |
static XchainOuterClass.InternalBlock |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static XchainOuterClass.InternalBlock |
parseFrom(com.google.protobuf.ByteString data) |
static XchainOuterClass.InternalBlock |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static XchainOuterClass.InternalBlock |
parseFrom(com.google.protobuf.CodedInputStream input) |
static XchainOuterClass.InternalBlock |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static XchainOuterClass.InternalBlock |
parseFrom(InputStream input) |
static XchainOuterClass.InternalBlock |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<XchainOuterClass.InternalBlock> |
parser() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, hashCode, isInitialized, isInitialized, makeImmutable, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, toBuilder, toStringpublic static final int VERSION_FIELD_NUMBER
public static final int NONCE_FIELD_NUMBER
public static final int BLOCKID_FIELD_NUMBER
public static final int PRE_HASH_FIELD_NUMBER
public static final int PROPOSER_FIELD_NUMBER
public static final int SIGN_FIELD_NUMBER
public static final int PUBKEY_FIELD_NUMBER
public static final int MERKLE_ROOT_FIELD_NUMBER
public static final int HEIGHT_FIELD_NUMBER
public static final int TIMESTAMP_FIELD_NUMBER
public static final int TRANSACTIONS_FIELD_NUMBER
public static final int TX_COUNT_FIELD_NUMBER
public static final int MERKLE_TREE_FIELD_NUMBER
public static final int CURTERM_FIELD_NUMBER
public static final int CURBLOCKNUM_FIELD_NUMBER
public static final int FAILED_TXS_FIELD_NUMBER
public static final int TARGETBITS_FIELD_NUMBER
public static final int JUSTIFY_FIELD_NUMBER
public static final int IN_TRUNK_FIELD_NUMBER
public static final int NEXT_HASH_FIELD_NUMBER
public int getVersion()
block version
optional int32 version = 1;public int getNonce()
Random number used to avoid replay attacks
optional int32 nonce = 2;public com.google.protobuf.ByteString getBlockid()
blockid generate the hash sign of the block used by sha256
optional bytes blockid = 3;public com.google.protobuf.ByteString getPreHash()
pre_hash is the parent blockid of the block
optional bytes pre_hash = 4;public com.google.protobuf.ByteString getProposer()
The miner id
optional bytes proposer = 5;public com.google.protobuf.ByteString getSign()
The sign which miner signed: blockid + nonce + timestamp
optional bytes sign = 6;public com.google.protobuf.ByteString getPubkey()
The pk of the miner
optional bytes pubkey = 7;public com.google.protobuf.ByteString getMerkleRoot()
The Merkle Tree root
optional bytes merkle_root = 8;public long getHeight()
The height of the blockchain
optional int64 height = 9;public long getTimestamp()
Timestamp of the block
optional int64 timestamp = 10;public List<XchainOuterClass.Transaction> getTransactionsList()
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public List<? extends XchainOuterClass.TransactionOrBuilder> getTransactionsOrBuilderList()
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public int getTransactionsCount()
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.Transaction getTransactions(int index)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.TransactionOrBuilder getTransactionsOrBuilder(int index)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public int getTxCount()
The transaction count of the block
optional int32 tx_count = 12;public List<com.google.protobuf.ByteString> getMerkleTreeList()
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public int getMerkleTreeCount()
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public com.google.protobuf.ByteString getMerkleTree(int index)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public long getCurTerm()
optional int64 curTerm = 16;public long getCurBlockNum()
optional int64 curBlockNum = 17;public int getFailedTxsCount()
XchainOuterClass.InternalBlockOrBuildertxid -> failed reason
map<string, string> failed_txs = 18;public boolean containsFailedTxs(String key)
txid -> failed reason
map<string, string> failed_txs = 18;@Deprecated public Map<String,String> getFailedTxs()
getFailedTxsMap() instead.public Map<String,String> getFailedTxsMap()
txid -> failed reason
map<string, string> failed_txs = 18;public String getFailedTxsOrDefault(String key, String defaultValue)
txid -> failed reason
map<string, string> failed_txs = 18;public String getFailedTxsOrThrow(String key)
txid -> failed reason
map<string, string> failed_txs = 18;public int getTargetBits()
optional int32 targetBits = 19;public boolean hasJustify()
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20;public Chainedbft.QuorumCert getJustify()
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20;public boolean getInTrunk()
下面的属性会动态变化 If the block is on the trunk
optional bool in_trunk = 14;public com.google.protobuf.ByteString getNextHash()
Next next block which on trunk
optional bytes next_hash = 15;public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo 在接口中 com.google.protobuf.MessageLiteIOExceptionpublic int getSerializedSize()
getSerializedSize 在接口中 com.google.protobuf.MessageLitepublic static XchainOuterClass.InternalBlock parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static XchainOuterClass.InternalBlock parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static XchainOuterClass.InternalBlock parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static XchainOuterClass.InternalBlock parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static XchainOuterClass.InternalBlock parseFrom(InputStream input) throws IOException
IOExceptionpublic static XchainOuterClass.InternalBlock parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static XchainOuterClass.InternalBlock parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static XchainOuterClass.InternalBlock parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static XchainOuterClass.InternalBlock parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static XchainOuterClass.InternalBlock parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static XchainOuterClass.InternalBlock.Builder newBuilder()
public static XchainOuterClass.InternalBlock.Builder newBuilder(XchainOuterClass.InternalBlock prototype)
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
dynamicMethod 在类中 com.google.protobuf.GeneratedMessageLite<XchainOuterClass.InternalBlock,XchainOuterClass.InternalBlock.Builder>public static XchainOuterClass.InternalBlock getDefaultInstance()
public static com.google.protobuf.Parser<XchainOuterClass.InternalBlock> parser()
Copyright © 2020. All rights reserved.