mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 09:54:03 +00:00
refactor: move pbft classes
This commit is contained in:
parent
cf885a53fa
commit
f35c257697
@ -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;
|
@ -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;
|
||||||
|
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
||||||
|
|
@ -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);
|
@ -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 {
|
@ -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.*;
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user