refactor: sdk for consensus algorithm

This commit is contained in:
汪旭鑫 2022-02-15 14:44:17 +08:00
parent 1ec1cac894
commit a87549a4c9
2 changed files with 19 additions and 0 deletions

View File

@ -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() {
}

View File

@ -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();
}
}