Skip to content

Java driver doesn't calculate the hash correctly #30

Description

@Eyliss

I'm using the Java driver for create a transaction that, then, it's send to our system backend in order to be sent from there.

The assets and the metadata are filled from a valid transaction also received from our backend:

Transaction createTransaction = BigchainDbTransactionBuilder
.init()
.addAssets(transaction.getAsset().getData(), TreeMap.class)
.addMetaData(transaction.getMetaData())
.operation(Operations.CREATE)
.buildAndSignOnly((EdDSAPublicKey) generatedPublic, (EdDSAPrivateKey) generatedPrivate);

sendFulfilledTransaction(createTransaction.toHashInput());

But the message The transaction's id isn't equal to the hash of its body is received when try to send the generated transaction. I think the id is not created correctly by the driver.

Thanks in advance.

Activity

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

Metadata

Metadata

Assignees

Labels

reviewReview is this is a valid issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions