support doip-start-port in TempActions

This commit is contained in:
CaiHQ 2023-04-28 17:51:36 +08:00
parent 94f1b6dc7d
commit e925d0e9e7
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ dependencies {
implementation 'com.nimbusds:nimbus-jose-jwt:9.10'
implementation 'org.bdware.doip:doip-sdk:1.4.2'
implementation 'org.bdware.doip:doip-audit-tool:1.2.6'
implementation 'org.bdware.doip:bdosclient:0.0.3'
implementation 'org.bdware.doip:bdosclient:0.0.5'
implementation fileTree(dir: 'lib', include: '*.jar')
testImplementation 'junit:junit:4.13.2'
implementation 'io.netty:netty-tcnative-boringssl-static:2.0.59.Final'

View File

@ -169,11 +169,13 @@ public class TemporyTestAction {
Contract c = new Contract();
c.setScript(args.get("script").getAsString());
c.setOwner(args.get("owner").getAsString());
c.setDoipPort(args.get("doipStartPort").getAsInt());
ContractManager.instance.allocateKeyIfNotExists(c);
JsonObject jo = JsonUtil.parseObjectAsJsonObject(c);
jo.addProperty("action", "onAllocateKeyPair");
resultCallback.onResult(jo.toString());
}
@Action(async = true)
public void reconnectPort(JsonObject args, ResultCallback resultCallback) {
ContractPort.PortVisitor reconnectVisitor = CMActions.manager.statusRecorder.getVisitor();