Class CallRecords


  • public final class CallRecords
    extends Object
    Provides information about call errors within a specific block.

    This data type can be used to get information or build proofs that execution of a certain call ended up with a particular status.

    Execution errors are preserved for transactions and before/after transaction handlers.

    Use Blockchain.getCallRecords(long) to instantiate this class.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Optional<com.exonum.messages.core.runtime.Errors.ExecutionError> get​(com.exonum.messages.core.Blockchain.CallInBlock callInBlock)
      Finds the error, if any, occurred in the given call.
      Map<com.exonum.messages.core.Blockchain.CallInBlock,​com.exonum.messages.core.runtime.Errors.ExecutionError> getErrors()
      Returns all errors in the block.
      com.exonum.messages.core.Proofs.CallProof getProof​(com.exonum.messages.core.Blockchain.CallInBlock callInBlock)
      Returns a cryptographic proof of authenticity for a top-level call within a block.
    • Method Detail

      • getErrors

        public Map<com.exonum.messages.core.Blockchain.CallInBlock,​com.exonum.messages.core.runtime.Errors.ExecutionError> getErrors()
        Returns all errors in the block.
      • get

        public Optional<com.exonum.messages.core.runtime.Errors.ExecutionError> get​(com.exonum.messages.core.Blockchain.CallInBlock callInBlock)
        Finds the error, if any, occurred in the given call.
        Parameters:
        callInBlock - the call ID
        Returns:
        an ExecutionError if one occurred in the given call in this block; or Optional.empty() if the call completed successfully or did not happen at all
        See Also:
        CallInBlocks
      • getProof

        public com.exonum.messages.core.Proofs.CallProof getProof​(com.exonum.messages.core.Blockchain.CallInBlock callInBlock)
        Returns a cryptographic proof of authenticity for a top-level call within a block.
        Parameters:
        callInBlock - the call ID
        See Also:
        Call Result Proofs, CallInBlocks