Skip to content

[LAOS] Add function to retrieve the rejected and accepted transaction hashes #364

Description

@appetrosyan

As per request, the mechanisms for retrieving the hashes of accepted and rejected transactions are not obvious.

As a possible solution, Igor suggests adding two functions into jp.co.soramitsu.iroha2.Extensions

fun VersionedRejectedTransaction.V1.hash(): ByteArray {
    return this.rejectedTransaction
        .payload
        .let { TransactionPayload.encode(it) }
        .hash()
}

fun VersionedValidTransaction.V1.hash(): ByteArray {
    return this.validTransaction
        .payload
        .let { TransactionPayload.encode(it) }
        .hash()
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions