mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 01:44:04 +00:00
optimize verifykey
This commit is contained in:
parent
f35c257697
commit
3c4c33bb1b
@ -1295,13 +1295,19 @@ public class ContractManager {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
// 9000
|
||||
|
||||
if (client.contractMeta.sigRequired) {
|
||||
if (!request.verifySignature()) {
|
||||
cr = new ContractResult(Status.Error, new JsonPrimitive("sign verified failed"));
|
||||
rcb.onResult(JsonUtil.parseObjectAsJsonObject(cr));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (request.getPublicKey() != null) {
|
||||
if (!request.verifySignature()) {
|
||||
request.setPublicKey(null);
|
||||
request.setRequester(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
client.times++;
|
||||
client.contractStatus = ContractStatus.Executing;
|
||||
@ -1358,6 +1364,13 @@ public class ContractManager {
|
||||
cr = new ContractResult(Status.Error, new JsonPrimitive("sign verified failed"));
|
||||
return JsonUtil.toJson(cr);
|
||||
}
|
||||
} else {
|
||||
if (request.getPublicKey() != null) {
|
||||
if (!request.verifySignature()) {
|
||||
request.setPublicKey(null);
|
||||
request.setRequester(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
client.times++;
|
||||
// 将合约状态改为“Executing”
|
||||
|
Loading…
Reference in New Issue
Block a user