https://github.com/celestiaorg/rsmt2d/pull/277 introduced a breaking change that requires users of this library to register trees via RegisterTree. Trees are later fetched from a global map of trees based on their treeConstructor (a.k.a. treeCreatorFn).
For example, in https://github.com/celestiaorg/celestia-app/pull/3065 I'm registering a tree for the square size 1. Then I run TestMinDataAvailabilityHeader which fails because the pointer inside treeFn doesn't match the pointer inside treeConstructor.
Context
https://github.com/celestiaorg/rsmt2d/pull/277 introduced a breaking change that requires users of this library to register trees via
RegisterTree
. Trees are later fetched from a global map of trees based on theirtreeConstructor
(a.k.a.treeCreatorFn
).Problem
This line does not evaluate to true when I expect it to. https://github.com/celestiaorg/rsmt2d/blob/bb5e119c2e8571fc8eb7aff3b6bca4915ffb4b18/tree.go#L77
For example, in https://github.com/celestiaorg/celestia-app/pull/3065 I'm registering a tree for the square size 1. Then I run
TestMinDataAvailabilityHeader
which fails because the pointer insidetreeFn
doesn't match the pointer insidetreeConstructor
.Screenshot
Proposal