Search in sources :

Example 1 with ServicesState

use of com.hedera.services.ServicesState in project hedera-services by hashgraph.

the class IssListener method notifyError.

@Override
public void notifyError(Platform platform, AddressBook addressBook, SwirldState swirldsState, Event[] events, NodeId self, NodeId other, long round, Instant consensusTime, long numConsEvents, byte[] sig, byte[] hash) {
    try {
        ServicesState issState = (ServicesState) swirldsState;
        issEventInfo.alert(consensusTime);
        if (issEventInfo.shouldDumpThisRound()) {
            issEventInfo.decrementRoundsToDump();
            var msg = String.format(ISS_ERROR_MSG_PATTERN, round, self.getId(), other.getId(), CommonUtils.hex(sig), CommonUtils.hex(hash));
            log.error(msg);
            if (nodeLocalProperties.shouldDumpFcmsOnIss()) {
                fcmDump.dumpFrom(issState, self, round);
            }
            issState.logSummary();
        }
    } catch (Exception any) {
        String fallbackMsg = String.format(ISS_FALLBACK_ERROR_MSG_PATTERN, round, self, other);
        log.warn(fallbackMsg, any);
    }
}
Also used : ServicesState(com.hedera.services.ServicesState)

Example 2 with ServicesState

use of com.hedera.services.ServicesState in project hedera-services by hashgraph.

the class ReconnectListener method notify.

@Override
public void notify(ReconnectCompleteNotification notification) {
    log.info("Notification Received: Reconnect Finished. " + "consensusTimestamp: {}, roundNumber: {}, sequence: {}", notification.getConsensusTimestamp(), notification.getRoundNumber(), notification.getSequence());
    ServicesState state = (ServicesState) notification.getState();
    state.logSummary();
    recordStreamManager.setStartWriteAtCompleteWindow(true);
    upgradeActions.catchUpOnMissedSideEffects();
}
Also used : ServicesState(com.hedera.services.ServicesState)

Aggregations

ServicesState (com.hedera.services.ServicesState)2