在API中增加一项判断,在组网中共识节点数目低于最少值,抛出错误信息,“共识节点数目太少,暂时无法处理交易”。

This commit is contained in:
wuwei1972 2019-09-05 17:29:24 +08:00
parent 57d6af3609
commit 022f616341

View File

@ -141,6 +141,11 @@ class RestActor(moduleName: String) extends ModuleBase(moduleName) {
if (t.toByteArray.length > tranLimitSize) {
sender ! PostResult(t.id, None, Option(s"交易大小超出限制: ${tranLimitSize},请重新检查"))
}
if (pe.getNodeMgr.getStableNodes.size < SystemProfile.getVoteNoteMin) {
sender ! PostResult(t.id, None, Option("系统共识节点数目太少,暂时无法处理交易"))
}
val sig = t.signature.get.signature.toByteArray
val tOutSig = t.clearSignature
val certId = t.signature.get.certId.get