在Fabric里有设置出块时间、区块大小的字段,如下:
字段 | 含义 | 默认值 |
---|---|---|
BatchTimeout | 出块时间 | 默认2秒 |
MaxMessageCount | 区块容纳的交易条数 | 默认10 条 |
AbsoluteMaxBytes | 区块大小 | 默认10MB |
PreferredMaxBytes | 每条交易的大小 | 默认512KB |
查看Fabric的案例目录下的fabric-sample/config/configtx.yaml文件,输入命令:
cat configtx.yaml |grep -A 40 "Batch Timeout:"
效果如下:
