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
The Stock::blank_builder and TransitionBuilder::blank_transition methods require an iface in order to construct a blank transition. I expect it to get the iface of the asset that is being moving with the blank transition. But currently it's getting the iface of the asset being requested through the invoice. After checking the involved code this seems a bug to me.
The text was updated successfully, but these errors were encountered:
Blank state transitions are not related to any specific interface, since they use a reserved transition type, which can't be used by any of the interfaces. So it actually doesn't matter which iface is used - but I think it could be an enhancement just to remove the second parameter from the Stock::blank_builder method
It doesn't seem so easy to remove the iface since it's used in several places (for example to extract the types for the OperationBuilder). I'm worried this might be hiding some bugs that aren't showing up because the interfaces of NIA, CFA and UDA (the only schemas we have tests for) are very similar. So if you're sure we can just remove the iface parameter from Stock::blank_builder and TransitionBuilder::blank_transition methods then please, let's do this relatively quickly.
Ok, I see that blank_transition returns the same TransitionBuilder, just pre-set with a proper transition type. So, to remove iface argument we need to implement a new BlankBuilder struct. Since we closed v0.11.0 for everything other than critical security fixes, that should be scheduled for v0.11.1.
I do not see how the current code can lead to bugs. Anyway, adding new builder won't be a breaking change or touch anything at the consensus, so even if there is a bug, it can always be fixed later when discovered.
The
Stock::blank_builder
andTransitionBuilder::blank_transition
methods require aniface
in order to construct a blank transition. I expect it to get the iface of the asset that is being moving with the blank transition. But currently it's getting the iface of the asset being requested through the invoice. After checking the involved code this seems a bug to me.The text was updated successfully, but these errors were encountered: