Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
appetrosyan opened this issue Jul 30, 2023 · 2 comments
Labels
enhancement New feature or request iroha2

Comments

@appetrosyan
Copy link

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()
}
@appetrosyan appetrosyan added iroha2 enhancement New feature or request labels Jul 30, 2023
@Mingela
Copy link
Contributor

Mingela commented Aug 2, 2023

If the scope of the issue is just this please just create a PR right away instead. Don't treat this rude, that'd be just much quicker than waiting for someone else to pick this up. We're always happy to have more contributors.

@appetrosyan
Copy link
Author

I suppose we have different processes. Happy to create the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iroha2
Projects
None yet
Development

No branches or pull requests

2 participants