Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

serix: fix empty slice from TxEssenceOutputs JSONEncode #678

Closed
jkrvivian opened this issue Jan 18, 2024 · 1 comment
Closed

serix: fix empty slice from TxEssenceOutputs JSONEncode #678

jkrvivian opened this issue Jan 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working team-node Issues for Node Team
Milestone

Comments

@jkrvivian
Copy link
Contributor

jkrvivian commented Jan 18, 2024

The Encode() works fine on TxEssenceOutputs, but JSONEncode returns an empty slice.

This bug is discovered in #676 .
The outputs assertion in AssertTransaction in test suite reports a difference in a slice of TxEssenceOutputs with 1 account output and 1 foundry output, changing to EqualValues or ElementsMatch all report an error. However, the actual values are the same.
In #676 , outputs are now checked after Encode()

if !assert.Equal(t.fakeTesting, transaction.Outputs, typedTransaction.Outputs) {

@jkrvivian jkrvivian converted this from a draft issue Jan 18, 2024
@jkrvivian jkrvivian added bug Something isn't working team-node Issues for Node Team labels Jan 18, 2024
@jkrvivian jkrvivian added this to the v1.0.0-beta milestone Jan 18, 2024
@jkrvivian
Copy link
Contributor Author

JSON doesn't support the encoding of arrays, only objects, thus an empty slice is returned.

@github-project-automation github-project-automation bot moved this from Backlog to Done in iota-core Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working team-node Issues for Node Team
Projects
Archived in project
Development

No branches or pull requests

2 participants