You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc @b-zee
I've adapted my client code to use the updated client registers API (autonomi v0.2.2).
To do so I have made a minor tweak to the API to access the merkle register by adding the method inner_merkle_reg(), which is also scheduled for inclusion in the API here: #2426).
Access to the merkle register is necessary for access the full history but this appears not to being updated by APIs other than register_get() which is unexpected behaviour.
This may be by design, in which case a comment on the API inner_merkle_reg() should be added.
Alternatively perhaps the merkle register should be updated when accessed (or when register_update() is called).
The text was updated successfully, but these errors were encountered:
this appears not to being updated by APIs other than register_get() which is unexpected behaviour.
From a Rust point of view, this is quite expected actually. The register has no shared ownership (no Arc/Mutex). It's like reading a file into a string, then updating the file, but the string that you just read is the same. However, I understand this isn't ideal as calling register_get is a very crude way to get the updated history.
I think it's 'unexpected' from the point of view of ordinary level devs (like me) using the API. Though if you start delving into the MReg this will be just one of many dragons! Still good to find a way to make it easier if we can, even if just documenting the behaviour.
A further thought is that it might be useful to have (or bring back) register_sync() so that you can know your register has been put, merged and has the most recent state.
cc @b-zee
I've adapted my client code to use the updated client registers API (autonomi v0.2.2).
To do so I have made a minor tweak to the API to access the merkle register by adding the method
inner_merkle_reg()
, which is also scheduled for inclusion in the API here: #2426).Access to the merkle register is necessary for access the full history but this appears not to being updated by APIs other than
register_get()
which is unexpected behaviour.This may be by design, in which case a comment on the API
inner_merkle_reg()
should be added.Alternatively perhaps the merkle register should be updated when accessed (or when
register_update()
is called).The text was updated successfully, but these errors were encountered: