Interface BlockCommittedEvent

  • All Known Implementing Classes:
    BlockCommittedEventImpl

    public interface BlockCommittedEvent
    The blockchain state just after the corresponding block is committed. This structure is passed to the Service.afterCommit(BlockCommittedEvent) method and is used for the interaction between service business logic and the blockchain state.
    • Method Summary

      Modifier and Type Method Description
      long getHeight()
      Returns the current blockchain height, which is the height of the last committed block.
      Snapshot getSnapshot()
      Returns the current database snapshot.
      OptionalInt getValidatorId()
      If this node is a validator, returns its identifier.
    • Method Detail

      • getValidatorId

        OptionalInt getValidatorId()
        If this node is a validator, returns its identifier. If this node is an auditor, it will return OptionalInt.empty().
      • getHeight

        long getHeight()
        Returns the current blockchain height, which is the height of the last committed block.
      • getSnapshot

        Snapshot getSnapshot()
        Returns the current database snapshot. It is immutable and represents the database state as of the block at the current height.