private void voteItself() { if (resyncingItem.getItemState().isConsensusFound()) resyncingItem.resyncVote(myInfo, resyncingItem.getItemState()); else resyncingItem.resyncVote(myInfo, ItemState.UNDEFINED); }
/** * Shortcut method: check that record exists and its state returns {@link ItemState#isConsensusFound()}}. Check it to * ensure its meaning. * * @param id is {@link HashId} for checking item * @return true if it is. */ default boolean isConsensusFound(HashId id) { StateRecord r = getRecord(id); return r != null && r.getState().isConsensusFound(); }
if(committingState.isConsensusFound()) { Set<NodeInfo> rNodes = new HashSet<>(); Set<NodeInfo> nowNodes = resyncNodes.get(committingState);
if (r == null || !r.getState().isConsensusFound()) { unknownParts.put(id, r); } else { StateRecord r = ledger.getRecord(a.getId()); if (r == null || !r.getState().isConsensusFound()) { unknownParts.put(a.getId(), r); } else {
StateRecord r = node.getLedger().getRecord(id); if (r == null || !r.getState().isConsensusFound()) { unknownParts.put(id, r); } else { StateRecord r = node.getLedger().getRecord(a.getId()); if (r == null || !r.getState().isConsensusFound()) { unknownParts.put(a.getId(), r); } else {
itemState = itemResult.state.isConsensusFound() ? itemResult.state : ItemState.UNDEFINED; else itemState = ItemState.UNDEFINED;
ItemResult r = n.waitItem(ok.getId(), 18000); int numIterations = 0; while( !r.state.isConsensusFound()) { System.out.println("wait for consensus receiving on the node " + n + " state is " + r.state); Thread.sleep(500);
System.out.println("-------------- check bad state " + badState + " isConsensusFind(" + badState.isConsensusFound() + ") --------");
ItemResult r = n.waitItem(parcel.getPayloadContract().getId(), 8000); int numIterations = 0; while( !r.state.isConsensusFound()) { System.out.println("wait for consensus receiving on the node " + n + " state is " + r.state); Thread.sleep(500);
if (item_x instanceof ItemResult && ((ItemResult) item_x).state.isConsensusFound()) { NodeInfo from = notification.getFrom(); ItemResult r = (ItemResult) item_x;