Open
Description
Hi,
As a user of orml_oracle
, we've found some limitations regarding the on_new_data()
callback when the oracle is fed:
on_new_data()
should return aDispatchResult
. A user could want to run custom logic that, if it fails, the oracle should not be fed. Right now, from the callback, we have no control over this situation.on_new_data()
should be called once with the whole list instead of one time per value. In our case, we use this callback as a trigger to make some expensive computations. We would save a lot of computation if we could combine this for all values.on_new_data()
should return theWeight
. Because the user can run an expensive operation inside the callback, it will be awesome to reflect it to accurately the block time computation.
We can discuss any of the points. If you finally agree with them, I could also make a PR. Thanks!
Metadata
Metadata
Assignees
Labels
No labels