filecoin-project / go-amt-ipld

Implementation of an array mapped trie using go and ipld
Other
9 stars 15 forks source link

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

Open frrist opened 3 years ago

frrist commented 3 years ago

If 2 AMT's with different Bitwidths are passed to the Diff method it will fail to diff their states, erroring here: https://github.com/filecoin-project/go-amt-ipld/blob/8a02dbd0b2713777c1132f59eb9afbdd3e64493f/diff.go#L181-L183

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: https://github.com/filecoin-project/go-amt-ipld/commit/8a02dbd0b2713777c1132f59eb9afbdd3e64493f