Closed anorth closed 1 year ago
https://github.com/filecoin-project/ref-fvm/pull/901 https://github.com/filecoin-project/ref-fvm/pull/1272
(or is this something different)
That looks like it. Sigh, why aren't the actors using this? I guess it went on the v3 branch even though we were deploying actors v10 on fvm v2.
The HAMT and AMT flush methods write the root block content to store even if it's the same data that was read from store. While this could in theory be detected and prevented by callers, it's easily overlooked. For example, a common pattern is:
To implement, I suggest
Node::flush()
return a boolean indicating whether it wrote anything, and then skip writing the root node if it didn't.