use of com.jd.blockchain.consensus.bftsmart.BftsmartNodeSettings in project jdchain-core by blockchain-jd-com.
the class BftsmartNodeServerFactory method getHashcode.
// compute hashcode for consensus nodes
private int getHashcode(NodeSettings[] nodeSettings) {
int i = 0;
NetworkAddress[] nodeAddrs = new NetworkAddress[nodeSettings.length];
for (NodeSettings setting : nodeSettings) {
nodeAddrs[i++] = ((BftsmartNodeSettings) setting).getNetworkAddress();
}
int hashCode = Arrays.hashCode(nodeAddrs);
return hashCode;
}
Aggregations