Skip to content

feat: make LazyLoadVersion validate InitialVersion the same as LoadVersion (backport #638)#666

Merged
tac0turtle merged 3 commits intorelease/v0.19.xfrom
mergify/bp/release/v0.19.x/pr-638
Feb 1, 2023
Merged

feat: make LazyLoadVersion validate InitialVersion the same as LoadVersion (backport #638)#666
tac0turtle merged 3 commits intorelease/v0.19.xfrom
mergify/bp/release/v0.19.x/pr-638

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 29, 2023

This is an automatic backport of pull request #638 done by Mergify.
Cherry-pick of d8e1e38 has failed:

On branch mergify/bp/release/v0.19.x/pr-638
Your branch is up to date with 'origin/release/v0.19.x'.

You are currently cherry-picking commit d8e1e38.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.md
	modified:   mutable_tree.go
	modified:   nodedb.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   mutable_tree_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…oadVersion`

Co-authored-by: Marko <marbar3778@yahoo.com>
Closes #637

(cherry picked from commit d8e1e38)

# Conflicts:
#	mutable_tree_test.go
Co-authored-by: yihuang <huang@crypto.com>
@tac0turtle
Copy link
Contributor

@yihuang can you help with the tests, then I can merge and release

@yihuang
Copy link

yihuang commented Jan 30, 2023

@yihuang can you help with the tests, then I can merge and release

The issue is due to mistakes in #665, should be fixed with following patch:

diff --git a/iterator.go b/iterator.go
index 1ae5c8c..86495d7 100644
--- a/iterator.go
+++ b/iterator.go
@@ -324,11 +324,10 @@ func (iter *NodeIterator) Next(isSkipped bool) {
                iter.err = err
                return
        }
-       iter.nodesToVisit = append(iter.nodesToVisit, leftNode)
        rightNode, err := iter.ndb.GetNode(node.rightHash)
        if err != nil {
                iter.err = err
                return
        }
-       iter.nodesToVisit = append(iter.nodesToVisit, rightNode)
+       iter.nodesToVisit = append(iter.nodesToVisit, rightNode, leftNode)
 }

@yihuang
Copy link

yihuang commented Feb 1, 2023

the tests are fixed here: #672 @tac0turtle

@tac0turtle tac0turtle merged commit ddbee02 into release/v0.19.x Feb 1, 2023
@tac0turtle tac0turtle deleted the mergify/bp/release/v0.19.x/pr-638 branch February 1, 2023 13:39
ankurdotb pushed a commit to cheqd/iavl that referenced this pull request Feb 28, 2023
…oadVersion` (backport cosmos#638) (cosmos#666)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants