Baker: do not generate random when not required
This commit is contained in:
parent
bf0dfda7d4
commit
9035bb94ab
@ -540,8 +540,13 @@ let bake (cctxt : #Proto_alpha.full) state =
|
|||||||
~shell_header ~priority ?seed_nonce_hash ~src_sk
|
~shell_header ~priority ?seed_nonce_hash ~src_sk
|
||||||
operations
|
operations
|
||||||
|> trace_exn (Failure "Error while injecting block") >>=? fun block_hash ->
|
|> trace_exn (Failure "Error while injecting block") >>=? fun block_hash ->
|
||||||
State.record_block cctxt level block_hash seed_nonce
|
begin
|
||||||
|> trace_exn (Failure "Error while recording block") >>=? fun () ->
|
if seed_nonce_hash <> None then
|
||||||
|
State.record_block cctxt level block_hash seed_nonce
|
||||||
|
|> trace_exn (Failure "Error while recording block")
|
||||||
|
else
|
||||||
|
return ()
|
||||||
|
end >>=? fun () ->
|
||||||
Client_keys.Public_key_hash.name cctxt delegate >>=? fun name ->
|
Client_keys.Public_key_hash.name cctxt delegate >>=? fun name ->
|
||||||
cctxt#message
|
cctxt#message
|
||||||
"Injected block %a for %s after %a \
|
"Injected block %a for %s after %a \
|
||||||
|
Loading…
Reference in New Issue
Block a user