Package com.exonum.binding.core.service
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.BlockchainData
getSnapshot()
Returns the current database snapshot for the executing service.java.util.OptionalInt
getValidatorId()
If this node is a validator, returns its identifier.
-
Method Details
-
getValidatorId
java.util.OptionalInt getValidatorId() -
getHeight
long getHeight()Returns the current blockchain height, which is the height of the last committed block. -
getSnapshot
BlockchainData getSnapshot()Returns the current database snapshot for the executing service. It is immutable and represents the database state as of the block at the current height.
-