|
Self::deposit_event(Event::<T>::UnexpectedSchedulerError); |
This case is unfortunate. This can obviously lead to the following scenario: A proposal is submitted and stored in Proposals, but because the scheduler has too many scheduled calls at proposal.when, it fails and the whole proposal is removed from the storage, although it has been evaluated to be approved. It might be better to have another extrinsic call that allows approved proposals to be scheduled at the time of the root origins choosing. So essentially this function here could be called evaluate_proposal that either emits Approved and stores a boolean flag approved in the proposal or Rejected that removes the proposal. After the successful scheduling from the root origin, the proposal can be removed too.
zeitgeist/zrml/futarchy/src/pallet_impls.rs
Line 44 in d7f9fbb
This case is unfortunate. This can obviously lead to the following scenario: A proposal is submitted and stored in
Proposals, but because the scheduler has too many scheduled calls atproposal.when, it fails and the whole proposal is removed from the storage, although it has been evaluated to be approved. It might be better to have another extrinsic call that allows approved proposals to be scheduled at the time of the root origins choosing. So essentially this function here could be calledevaluate_proposalthat either emitsApprovedand stores a boolean flagapprovedin the proposal orRejectedthat removes the proposal. After the successful scheduling from the root origin, the proposal can be removed too.