mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 01:44:04 +00:00
refactor: sdk for consensus algorithm
This commit is contained in:
parent
1ec1cac894
commit
a87549a4c9
@ -5,9 +5,17 @@ import org.bdware.sc.conn.Node;
|
||||
import org.bdware.sc.conn.OnHashCallback;
|
||||
import org.bdware.sc.conn.ResultCallback;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ContractExecutor {
|
||||
void execute(String requestID, ContractRequest req, ResultCallback rcb, OnHashCallback hcb);
|
||||
|
||||
default void onRecover(Map<String, Object> args) {
|
||||
}
|
||||
|
||||
default void onDeliverBlock(String data) {
|
||||
}
|
||||
|
||||
default void close() {
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
package org.bdware.server.trustedmodel;
|
||||
|
||||
public class MultiReqSeq {
|
||||
public final int seq;
|
||||
public final long startTime;
|
||||
|
||||
public MultiReqSeq(int s){
|
||||
seq = s;
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user