Class BlockCommittedEventImpl

    • Constructor Detail

      • BlockCommittedEventImpl

        public BlockCommittedEventImpl()
    • Method Detail

      • valueOf

        public static BlockCommittedEventImpl valueOf​(Snapshot snapshot,
                                                      OptionalInt validatorId,
                                                      long height)
        Creates a new block committed event.
        Parameters:
        snapshot - a snapshot of the blockchain state
        validatorId - a validator id. OptionalInt.empty() if this node is not a validator
        height - the current blockchain height
      • getHeight

        public abstract long getHeight()
        Description copied from interface: BlockCommittedEvent
        Returns the current blockchain height, which is the height of the last committed block.
        Specified by:
        getHeight in interface BlockCommittedEvent