2021SC@SDUSC
区块
jdchain对于区块采用BFT-SMaRt
共识协议,即时出块,单个区块交易数限制默认为2000
(bftsmart.config
中参数system.totalordermulticast.maxbatchsize
)
下面是区块的结构:注释都写在代码中
LedgerBlock
:
@DataContract(code = DataCodes.BLOCK)
public interface LedgerBlock extends BlockBody {
/**
* 区块哈希;
*/
@DataField(order = 1, primitiveType = PrimitiveType.BYTES)
HashDigest getHash();
}
BlockBody
:
@DataContract(code= DataCodes.BLOCK_BODY)
public interface