refactor: move pbft classes

This commit is contained in:
CaiHQ 2021-11-28 14:52:10 +08:00
parent cf885a53fa
commit f35c257697
10 changed files with 18 additions and 11 deletions

View File

@ -1,4 +1,4 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency;
import org.bdware.sc.conn.Node; import org.bdware.sc.conn.Node;
import org.bdware.sc.units.TrustfulExecutorConnection; import org.bdware.sc.units.TrustfulExecutorConnection;

View File

@ -1,4 +1,4 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency;
import org.bdware.sc.bean.ContractRequest; import org.bdware.sc.bean.ContractRequest;

View File

@ -1,4 +1,4 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency;
public class Pair<T1, T2> { public class Pair<T1, T2> {
public T1 first; public T1 first;

View File

@ -1,10 +1,13 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency.pbft;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.bdware.sc.ContractManager; import org.bdware.sc.ContractManager;
import org.bdware.sc.bean.ContractRequest; import org.bdware.sc.bean.ContractRequest;
import org.bdware.sc.conn.Node; import org.bdware.sc.conn.Node;
import org.bdware.sc.consistency.CommitAlgorithm;
import org.bdware.sc.consistency.Committer;
import org.bdware.sc.consistency.Pair;
import org.bdware.sc.units.TrustfulExecutorConnection; import org.bdware.sc.units.TrustfulExecutorConnection;
import org.bdware.sc.util.JsonUtil; import org.bdware.sc.util.JsonUtil;
import org.zz.gmhelper.SM2KeyPair; import org.zz.gmhelper.SM2KeyPair;

View File

@ -1,4 +1,4 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency.pbft;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;

View File

@ -1,4 +1,4 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency.pbft;
import org.bdware.sc.conn.ByteUtil; import org.bdware.sc.conn.ByteUtil;

View File

@ -1,4 +1,4 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency.pbft;
public enum PBFTType { public enum PBFTType {
Request(0), PrePrepare(1), Prepare(2), Commit(3), Reply(4), Unknown(5), ReSend(6), AddMember(7); Request(0), PrePrepare(1), Prepare(2), Commit(3), Reply(4), Unknown(5), ReSend(6), AddMember(7);

View File

@ -1,7 +1,11 @@
package org.bdware.sc.sequencing; package org.bdware.sc.consistency.pbft;
import org.bdware.sc.bean.ContractRequest; import org.bdware.sc.bean.ContractRequest;
import org.bdware.sc.conn.Node; import org.bdware.sc.conn.Node;
import org.bdware.sc.consistency.CommitAlgorithm;
import org.bdware.sc.consistency.Committer;
import org.bdware.sc.consistency.pbft.PBFTMessage;
import org.bdware.sc.consistency.pbft.PBFTType;
import org.bdware.sc.units.TrustfulExecutorConnection; import org.bdware.sc.units.TrustfulExecutorConnection;
public class ViewAlgorithm implements CommitAlgorithm { public class ViewAlgorithm implements CommitAlgorithm {

View File

@ -4,7 +4,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.bdware.sc.ContractManager; import org.bdware.sc.ContractManager;
import org.bdware.sc.conn.Node; import org.bdware.sc.conn.Node;
import org.bdware.sc.sequencing.CommitAlgorithm; import org.bdware.sc.consistency.CommitAlgorithm;
import java.io.Serializable; import java.io.Serializable;
import java.util.*; import java.util.*;

View File

@ -1,6 +1,6 @@
package org.bdware.sc.units; package org.bdware.sc.units;
import org.bdware.sc.sequencing.CommitAlgorithm; import org.bdware.sc.consistency.CommitAlgorithm;
import org.bdware.sc.units.ContractUnitController.ContractUnit; import org.bdware.sc.units.ContractUnitController.ContractUnit;
public interface SequencingAlgorithmFactory { public interface SequencingAlgorithmFactory {