merge pbft algorithm

This commit is contained in:
CaiHQ 2021-11-22 11:50:40 +08:00
parent 9b1ca64af9
commit 022b1d3902

View File

@ -10,7 +10,9 @@ public enum ContractExecType implements Serializable {
RequestAllResponseHalf, RequestAllResponseHalf,
RequestAllResponseAll, RequestAllResponseAll,
Sharding,//分片执行模式 Sharding,//分片执行模式
SelfAdaptiveSharding; // self-adaptive sharding SelfAdaptiveSharding,// self-adaptive sharding
PBFT; //PBFT
public static ContractExecType getContractTypeByInt(int i) { public static ContractExecType getContractTypeByInt(int i) {
ContractExecType[] values = ContractExecType.values(); ContractExecType[] values = ContractExecType.values();
@ -20,6 +22,10 @@ public enum ContractExecType implements Serializable {
return ContractExecType.values()[i]; return ContractExecType.values()[i];
} }
public boolean isUnit() {
return this != Sole;
}
public boolean needSeq() { public boolean needSeq() {
switch (this) { switch (this) {
case Sole: case Sole: