filecoin-project/go-amt-ipld

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

frrist opened this issue · 0 comments

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