Alpha/Endorser: clean-up state after endorsment

Remove endorsment slot once it is used. This avoids repeated injection
of the same endorsment operation.
This commit is contained in:
Raphaël Proust 2018-06-13 15:04:17 +08:00 committed by Grégoire Henry
parent b0e9e44673
commit 97fe3f5ca9

View File

@ -283,7 +283,9 @@ let create
last_get_block := None; last_get_block := None;
check_error (prepare_endorsement cctxt ~max_past state bi) check_error (prepare_endorsement cctxt ~max_past state bi)
| `Timeout -> | `Timeout ->
check_error (endorse_for cctxt state.to_endorse) check_error (endorse_for cctxt state.to_endorse) >>= fun () ->
state.to_endorse <- None ;
Lwt.return_unit
end >>= fun () -> end >>= fun () ->
worker_loop () in worker_loop () in