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.
Description
Fix some bugs
GetTransactionChain
message can return in asc or desc order, the conflict resolver was not accurate :let's asume a chain TX1 -> TX2 -> TX3 -> TX4 -> TX5 -> TX6 -> TX7 and the nb of tx returned is 5 by request in desc order
if a node didn't replicate the last transaction we could have a result like
node1 :
node2 :
node3: same as node2
The good return is node2 and node3 result, but as node1 and other have more? at true and length of transactions list is the same, so the previous conflict resolver take the first element of the returns list which can be node1 with the wrong result.
So to fix this I added a sort on the timestamp of the first transaction of the list (regarding the order requested)
Type of change
Checklist: