Baker: fix cherry-picking

This commit is contained in:
MBourgoin 2018-06-05 14:05:53 +02:00 committed by Grégoire Henry
parent 9d4be9caba
commit 589096680a
2 changed files with 5 additions and 7 deletions

View File

@ -98,7 +98,6 @@ let reveal_block_nonces (cctxt : #Proto_alpha.full) block_hashes =
do_reveal cctxt cctxt#block blocks do_reveal cctxt cctxt#block blocks
let reveal_nonces cctxt () = let reveal_nonces cctxt () =
let block = Block_services.last_baked_block cctxt#block in
Client_baking_forge.get_unrevealed_nonces Client_baking_forge.get_unrevealed_nonces
cctxt cctxt#block >>=? fun nonces -> cctxt cctxt#block >>=? fun nonces ->
do_reveal cctxt cctxt#block nonces do_reveal cctxt cctxt#block nonces
@ -109,7 +108,7 @@ let run_daemon cctxt ?max_priority ~endorsement_delay delegates ~endorsement ~ba
Client_daemon.Endorser.run cctxt Client_daemon.Endorser.run cctxt
~delay:endorsement_delay ~delay:endorsement_delay
~min_date:((Time.add (Time.now ()) (Int64.neg 1800L))) ~min_date:((Time.add (Time.now ()) (Int64.neg 1800L)))
(List.map snd delegates) >>=? fun () -> return () delegates >>=? fun () -> return ()
else return () else return ()
in in
let baker = let baker =
@ -117,7 +116,7 @@ let run_daemon cctxt ?max_priority ~endorsement_delay delegates ~endorsement ~ba
Client_daemon.Baker.run cctxt Client_daemon.Baker.run cctxt
?max_priority ?max_priority
~min_date:((Time.add (Time.now ()) (Int64.neg 1800L))) ~min_date:((Time.add (Time.now ()) (Int64.neg 1800L)))
(List.map snd delegates) >>=? fun () -> return () delegates >>=? fun () -> return ()
else return () else return ()
in in
let accuser = let accuser =

View File

@ -11,16 +11,15 @@ open Client_proto_args
open Client_baking_lib open Client_baking_lib
let group = let group =
{ Cli_entries.name = "delegate" ; { Clic.name = "delegate" ;
title = "Commands related to delegate operations." } title = "Commands related to delegate operations." }
let commands () = let commands () =
let open Clic in let open Clic in
[ [
command ~group ~desc: "Launch a daemon that handles delegate operations." command ~group ~desc: "Launch a daemon that handles delegate operations."
(args5 max_priority_arg endorsement_delay_arg (args1 max_priority_arg)
Daemon.baking_switch Daemon.endorsement_switch Daemon.denunciation_switch) (prefixes [ "launch" ; "baker" ]
(prefixes [ "launch" ; "daemon" ]
@@ seq_of_param Client_keys.Public_key_hash.alias_param) @@ seq_of_param Client_keys.Public_key_hash.alias_param)
(fun max_priority delegates cctxt -> (fun max_priority delegates cctxt ->
Client_daemon.Baker.run cctxt Client_daemon.Baker.run cctxt