public static final class XchainOuterClass.InternalBlock.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<XchainOuterClass.InternalBlock,XchainOuterClass.InternalBlock.Builder> implements XchainOuterClass.InternalBlockOrBuilder
The internal block struct
Protobuf type pb.InternalBlock
| 限定符和类型 | 方法和说明 |
|---|---|
XchainOuterClass.InternalBlock.Builder |
addAllMerkleTree(Iterable<? extends com.google.protobuf.ByteString> values)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
XchainOuterClass.InternalBlock.Builder |
addAllTransactions(Iterable<? extends XchainOuterClass.Transaction> values)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
addMerkleTree(com.google.protobuf.ByteString value)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
XchainOuterClass.InternalBlock.Builder |
addTransactions(int index,
XchainOuterClass.Transaction.Builder builderForValue)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
addTransactions(int index,
XchainOuterClass.Transaction value)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
addTransactions(XchainOuterClass.Transaction.Builder builderForValue)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
addTransactions(XchainOuterClass.Transaction value)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
clearBlockid()
blockid generate the hash sign of the block used by sha256
optional bytes blockid = 3; |
XchainOuterClass.InternalBlock.Builder |
clearCurBlockNum()
optional int64 curBlockNum = 17; |
XchainOuterClass.InternalBlock.Builder |
clearCurTerm()
optional int64 curTerm = 16; |
XchainOuterClass.InternalBlock.Builder |
clearFailedTxs() |
XchainOuterClass.InternalBlock.Builder |
clearHeight()
The height of the blockchain
optional int64 height = 9; |
XchainOuterClass.InternalBlock.Builder |
clearInTrunk()
下面的属性会动态变化
If the block is on the trunk
optional bool in_trunk = 14; |
XchainOuterClass.InternalBlock.Builder |
clearJustify()
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20; |
XchainOuterClass.InternalBlock.Builder |
clearMerkleRoot()
The Merkle Tree root
optional bytes merkle_root = 8; |
XchainOuterClass.InternalBlock.Builder |
clearMerkleTree()
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
XchainOuterClass.InternalBlock.Builder |
clearNextHash()
Next next block which on trunk
optional bytes next_hash = 15; |
XchainOuterClass.InternalBlock.Builder |
clearNonce()
Random number used to avoid replay attacks
optional int32 nonce = 2; |
XchainOuterClass.InternalBlock.Builder |
clearPreHash()
pre_hash is the parent blockid of the block
optional bytes pre_hash = 4; |
XchainOuterClass.InternalBlock.Builder |
clearProposer()
The miner id
optional bytes proposer = 5; |
XchainOuterClass.InternalBlock.Builder |
clearPubkey()
The pk of the miner
optional bytes pubkey = 7; |
XchainOuterClass.InternalBlock.Builder |
clearSign()
The sign which miner signed: blockid + nonce + timestamp
optional bytes sign = 6; |
XchainOuterClass.InternalBlock.Builder |
clearTargetBits()
optional int32 targetBits = 19; |
XchainOuterClass.InternalBlock.Builder |
clearTimestamp()
Timestamp of the block
optional int64 timestamp = 10; |
XchainOuterClass.InternalBlock.Builder |
clearTransactions()
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
clearTxCount()
The transaction count of the block
optional int32 tx_count = 12; |
XchainOuterClass.InternalBlock.Builder |
clearVersion()
block version
optional int32 version = 1; |
boolean |
containsFailedTxs(String key)
txid -> failed reason
map<string, string> failed_txs = 18; |
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; |
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; |
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; |
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; |
XchainOuterClass.InternalBlock.Builder |
mergeJustify(Chainedbft.QuorumCert value)
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20; |
XchainOuterClass.InternalBlock.Builder |
putAllFailedTxs(Map<String,String> values)
txid -> failed reason
map<string, string> failed_txs = 18; |
XchainOuterClass.InternalBlock.Builder |
putFailedTxs(String key,
String value)
txid -> failed reason
map<string, string> failed_txs = 18; |
XchainOuterClass.InternalBlock.Builder |
removeFailedTxs(String key)
txid -> failed reason
map<string, string> failed_txs = 18; |
XchainOuterClass.InternalBlock.Builder |
removeTransactions(int index)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
setBlockid(com.google.protobuf.ByteString value)
blockid generate the hash sign of the block used by sha256
optional bytes blockid = 3; |
XchainOuterClass.InternalBlock.Builder |
setCurBlockNum(long value)
optional int64 curBlockNum = 17; |
XchainOuterClass.InternalBlock.Builder |
setCurTerm(long value)
optional int64 curTerm = 16; |
XchainOuterClass.InternalBlock.Builder |
setHeight(long value)
The height of the blockchain
optional int64 height = 9; |
XchainOuterClass.InternalBlock.Builder |
setInTrunk(boolean value)
下面的属性会动态变化
If the block is on the trunk
optional bool in_trunk = 14; |
XchainOuterClass.InternalBlock.Builder |
setJustify(Chainedbft.QuorumCert.Builder builderForValue)
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20; |
XchainOuterClass.InternalBlock.Builder |
setJustify(Chainedbft.QuorumCert value)
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20; |
XchainOuterClass.InternalBlock.Builder |
setMerkleRoot(com.google.protobuf.ByteString value)
The Merkle Tree root
optional bytes merkle_root = 8; |
XchainOuterClass.InternalBlock.Builder |
setMerkleTree(int index,
com.google.protobuf.ByteString value)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13; |
XchainOuterClass.InternalBlock.Builder |
setNextHash(com.google.protobuf.ByteString value)
Next next block which on trunk
optional bytes next_hash = 15; |
XchainOuterClass.InternalBlock.Builder |
setNonce(int value)
Random number used to avoid replay attacks
optional int32 nonce = 2; |
XchainOuterClass.InternalBlock.Builder |
setPreHash(com.google.protobuf.ByteString value)
pre_hash is the parent blockid of the block
optional bytes pre_hash = 4; |
XchainOuterClass.InternalBlock.Builder |
setProposer(com.google.protobuf.ByteString value)
The miner id
optional bytes proposer = 5; |
XchainOuterClass.InternalBlock.Builder |
setPubkey(com.google.protobuf.ByteString value)
The pk of the miner
optional bytes pubkey = 7; |
XchainOuterClass.InternalBlock.Builder |
setSign(com.google.protobuf.ByteString value)
The sign which miner signed: blockid + nonce + timestamp
optional bytes sign = 6; |
XchainOuterClass.InternalBlock.Builder |
setTargetBits(int value)
optional int32 targetBits = 19; |
XchainOuterClass.InternalBlock.Builder |
setTimestamp(long value)
Timestamp of the block
optional int64 timestamp = 10; |
XchainOuterClass.InternalBlock.Builder |
setTransactions(int index,
XchainOuterClass.Transaction.Builder builderForValue)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
setTransactions(int index,
XchainOuterClass.Transaction value)
Transactions of the block, only txid stored on kv, the detail information
stored in another table
repeated .pb.Transaction transactions = 11; |
XchainOuterClass.InternalBlock.Builder |
setTxCount(int value)
The transaction count of the block
optional int32 tx_count = 12; |
XchainOuterClass.InternalBlock.Builder |
setVersion(int value)
block version
optional int32 version = 1; |
build, buildPartial, clear, clone, copyOnWrite, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFromaddAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionpublic int getVersion()
block version
optional int32 version = 1;public XchainOuterClass.InternalBlock.Builder setVersion(int value)
block version
optional int32 version = 1;public XchainOuterClass.InternalBlock.Builder clearVersion()
block version
optional int32 version = 1;public int getNonce()
Random number used to avoid replay attacks
optional int32 nonce = 2;public XchainOuterClass.InternalBlock.Builder setNonce(int value)
Random number used to avoid replay attacks
optional int32 nonce = 2;public XchainOuterClass.InternalBlock.Builder clearNonce()
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 XchainOuterClass.InternalBlock.Builder setBlockid(com.google.protobuf.ByteString value)
blockid generate the hash sign of the block used by sha256
optional bytes blockid = 3;public XchainOuterClass.InternalBlock.Builder clearBlockid()
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 XchainOuterClass.InternalBlock.Builder setPreHash(com.google.protobuf.ByteString value)
pre_hash is the parent blockid of the block
optional bytes pre_hash = 4;public XchainOuterClass.InternalBlock.Builder clearPreHash()
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 XchainOuterClass.InternalBlock.Builder setProposer(com.google.protobuf.ByteString value)
The miner id
optional bytes proposer = 5;public XchainOuterClass.InternalBlock.Builder clearProposer()
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 XchainOuterClass.InternalBlock.Builder setSign(com.google.protobuf.ByteString value)
The sign which miner signed: blockid + nonce + timestamp
optional bytes sign = 6;public XchainOuterClass.InternalBlock.Builder clearSign()
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 XchainOuterClass.InternalBlock.Builder setPubkey(com.google.protobuf.ByteString value)
The pk of the miner
optional bytes pubkey = 7;public XchainOuterClass.InternalBlock.Builder clearPubkey()
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 XchainOuterClass.InternalBlock.Builder setMerkleRoot(com.google.protobuf.ByteString value)
The Merkle Tree root
optional bytes merkle_root = 8;public XchainOuterClass.InternalBlock.Builder clearMerkleRoot()
The Merkle Tree root
optional bytes merkle_root = 8;public long getHeight()
The height of the blockchain
optional int64 height = 9;public XchainOuterClass.InternalBlock.Builder setHeight(long value)
The height of the blockchain
optional int64 height = 9;public XchainOuterClass.InternalBlock.Builder clearHeight()
The height of the blockchain
optional int64 height = 9;public long getTimestamp()
Timestamp of the block
optional int64 timestamp = 10;public XchainOuterClass.InternalBlock.Builder setTimestamp(long value)
Timestamp of the block
optional int64 timestamp = 10;public XchainOuterClass.InternalBlock.Builder clearTimestamp()
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 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.InternalBlock.Builder setTransactions(int index, XchainOuterClass.Transaction value)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder setTransactions(int index, XchainOuterClass.Transaction.Builder builderForValue)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder addTransactions(XchainOuterClass.Transaction value)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder addTransactions(int index, XchainOuterClass.Transaction value)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder addTransactions(XchainOuterClass.Transaction.Builder builderForValue)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder addTransactions(int index, XchainOuterClass.Transaction.Builder builderForValue)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder addAllTransactions(Iterable<? extends XchainOuterClass.Transaction> values)
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder clearTransactions()
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated .pb.Transaction transactions = 11;public XchainOuterClass.InternalBlock.Builder removeTransactions(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 XchainOuterClass.InternalBlock.Builder setTxCount(int value)
The transaction count of the block
optional int32 tx_count = 12;public XchainOuterClass.InternalBlock.Builder clearTxCount()
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 XchainOuterClass.InternalBlock.Builder setMerkleTree(int index, com.google.protobuf.ByteString value)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public XchainOuterClass.InternalBlock.Builder addMerkleTree(com.google.protobuf.ByteString value)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public XchainOuterClass.InternalBlock.Builder addAllMerkleTree(Iterable<? extends com.google.protobuf.ByteString> values)
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public XchainOuterClass.InternalBlock.Builder clearMerkleTree()
所有交易hash的merkle tree
repeated bytes merkle_tree = 13;public long getCurTerm()
optional int64 curTerm = 16;public XchainOuterClass.InternalBlock.Builder setCurTerm(long value)
optional int64 curTerm = 16;public XchainOuterClass.InternalBlock.Builder clearCurTerm()
optional int64 curTerm = 16;public long getCurBlockNum()
optional int64 curBlockNum = 17;public XchainOuterClass.InternalBlock.Builder setCurBlockNum(long value)
optional int64 curBlockNum = 17;public XchainOuterClass.InternalBlock.Builder clearCurBlockNum()
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;public XchainOuterClass.InternalBlock.Builder clearFailedTxs()
public XchainOuterClass.InternalBlock.Builder removeFailedTxs(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 XchainOuterClass.InternalBlock.Builder putFailedTxs(String key, String value)
txid -> failed reason
map<string, string> failed_txs = 18;public XchainOuterClass.InternalBlock.Builder putAllFailedTxs(Map<String,String> values)
txid -> failed reason
map<string, string> failed_txs = 18;public int getTargetBits()
optional int32 targetBits = 19;public XchainOuterClass.InternalBlock.Builder setTargetBits(int value)
optional int32 targetBits = 19;public XchainOuterClass.InternalBlock.Builder clearTargetBits()
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 XchainOuterClass.InternalBlock.Builder setJustify(Chainedbft.QuorumCert value)
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20;public XchainOuterClass.InternalBlock.Builder setJustify(Chainedbft.QuorumCert.Builder builderForValue)
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20;public XchainOuterClass.InternalBlock.Builder mergeJustify(Chainedbft.QuorumCert value)
Justify used in chained-bft
optional .pb.QuorumCert Justify = 20;public XchainOuterClass.InternalBlock.Builder clearJustify()
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 XchainOuterClass.InternalBlock.Builder setInTrunk(boolean value)
下面的属性会动态变化 If the block is on the trunk
optional bool in_trunk = 14;public XchainOuterClass.InternalBlock.Builder clearInTrunk()
下面的属性会动态变化 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 XchainOuterClass.InternalBlock.Builder setNextHash(com.google.protobuf.ByteString value)
Next next block which on trunk
optional bytes next_hash = 15;public XchainOuterClass.InternalBlock.Builder clearNextHash()
Next next block which on trunk
optional bytes next_hash = 15;Copyright © 2020. All rights reserved.