Skip to content

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

@appetrosyan

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()
}

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