Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff method fails to diff two AMT's with differeing Bitwidths #54

Open
frrist opened this issue May 5, 2021 · 0 comments
Open

Diff method fails to diff two AMT's with differeing Bitwidths #54

frrist opened this issue May 5, 2021 · 0 comments

Comments

@frrist
Copy link
Member

frrist commented May 5, 2021

If 2 AMT's with different Bitwidths are passed to the Diff method it will fail to diff their states, erroring here:

go-amt-ipld/diff.go

Lines 181 to 183 in 8a02dbd

if len(prev.links) != len(cur.links) {
return nil, fmt.Errorf("nodes have different numbers of links (prev=%d, cur=%d)", len(prev.links), len(cur.links))

In order to be used as a generic AMT diffing method, this should be supported. Based on the commit for the change I believe this was intended: 8a02dbd

frrist added a commit that referenced this issue May 5, 2021
- bail on diffing AMTs with different BitWidths until #54 is addressed.
frrist added a commit that referenced this issue May 5, 2021
- bail on diffing AMTs with different BitWidths until #54 is addressed.
@frrist frrist changed the title Diff method fails to diff tow AMT's with differeing Bitwidths Diff method fails to diff two AMT's with differeing Bitwidths May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant