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
I am fixing benchmarks in pallet_bounties because the benchmarks took advantage of some behavior when on_initialize(0) was executed.
However, in a real blockchain, there will never be an on_initialize(0), so this was a hack which later broke when it shouldn't have.
I think within the macros, we should implement some sort of debug panic (or real panic) if the input to on_initialize is zero, to discourage anyone from running the function in this scenario.
The text was updated successfully, but these errors were encountered:
I am fixing benchmarks in
pallet_bounties
because the benchmarks took advantage of some behavior whenon_initialize(0)
was executed.However, in a real blockchain, there will never be an
on_initialize(0)
, so this was a hack which later broke when it shouldn't have.I think within the macros, we should implement some sort of debug panic (or real panic) if the input to
on_initialize
is zero, to discourage anyone from running the function in this scenario.The text was updated successfully, but these errors were encountered: