This repository was archived by the owner on Mar 12, 2020. It is now read-only.
fix: Fix transaction offset#1472
Open
howjmay wants to merge 1 commit into
Open
Conversation
In `transaction_serialize_to_flex_trits()` the value of macro `NUM_TRITS_*` and `NUM_FLEX_TRITS_*` may not always be the same values, so we need to unify them.
Contributor
|
Hi @howjmay, the documentation of this function says that the size should be in trits, not flex_trits. /// Inserts the contents of an array into another array starting at a given
/// index.
/// @param[in] to_flex_trits - the array to insert into
/// @param[in] to_len - the number of trits encoded in the to_flex_trits array
/// @param[in] flex_trits - the array containing the trits to copy over
/// @param[in] len - the number of trits the flex_trits array stores
/// @param[in] start - the start index in the destination array
/// @param[in] num_trits - the number of trits to copy over
/// @return size_t - the number of trits copied over
size_t flex_trits_insert(flex_trit_t *const to_flex_trits, size_t const to_len, flex_trit_t const *const flex_trits,
size_t const len, size_t const start, size_t const num_trits); |
Contributor
Author
|
However I wonder that if the sizes used here are in |
Contributor
|
This line 133 https://github.com/iotaledger/entangled/pull/1472/files#diff-fcfdd8b4cc72f7c24ae51e4061656b3aR133 ? It looks good to me, it's only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
<>
In
transaction_serialize_to_flex_trits()the value ofmacro
NUM_TRITS_*andNUM_FLEX_TRITS_*may notalways be the same values, so we need to unify them.
Test Plan:
<<Outline how the reviewer can verify & test your changes here>>