Skip to content

区块链浏览器只配置观察节点导致群组内共识节点异常 #253

Open
@wanxi112233

Description

@wanxi112233

想通过一个观察节点去获取到该群组内的信息并展示到区块链浏览器上,
但是在区块链浏览器这里代码有问题
在SchedulerService中,在没有新的交易区块产生的情况下,本地的区块和链上的区块高度一致,但是由于是观察节点获取到的节点列表,所有pbftview的值也是链上链下一致,这直接导致共识节点的状态被置为异常
if (nodeType == NodeType.CONSENSUS.getValue()) {
if (blockNumber == loop.getBlockNumber() && pbftView == loop.getPbftView()) {
map.put("status", NodeStatus.INVALID.getValue());
} else {
map.put("status", NodeStatus.NORMAL.getValue());
}
} else {
if (blockNumber != web3jRpc.getBlockNumber(groupId)) {
map.put("status", NodeStatus.INVALID.getValue());
} else {
map.put("status", NodeStatus.NORMAL.getValue());
}
}
nodeMapper.updateStatus(map);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions