Accuser: add utility functions to forge double_evidence operations
This commit is contained in:
parent
989c0193a1
commit
aa95ee8332
@ -424,6 +424,14 @@ module Forge = struct
|
||||
block ~branch ~level ~nonce () =
|
||||
operation ctxt block ~branch (Seed_nonce_revelation { level ; nonce })
|
||||
|
||||
let double_baking_evidence ctxt
|
||||
block ~branch ~bh1 ~bh2 () =
|
||||
operation ctxt block ~branch (Double_baking_evidence { bh1 ; bh2 })
|
||||
|
||||
let double_endorsement_evidence ctxt
|
||||
block ~branch ~op1 ~op2 () =
|
||||
operation ctxt block ~branch (Double_endorsement_evidence { op1 ; op2 })
|
||||
|
||||
let empty_proof_of_work_nonce =
|
||||
MBytes.of_string
|
||||
(String.make Constants_repr.proof_of_work_nonce_size '\000')
|
||||
|
@ -154,6 +154,20 @@ module Forge : sig
|
||||
nonce:Nonce.t ->
|
||||
unit -> MBytes.t shell_tzresult Lwt.t
|
||||
|
||||
val double_baking_evidence:
|
||||
'a #RPC_context.simple -> 'a ->
|
||||
branch:Block_hash.t ->
|
||||
bh1: Block_header.t ->
|
||||
bh2: Block_header.t ->
|
||||
unit -> MBytes.t shell_tzresult Lwt.t
|
||||
|
||||
val double_endorsement_evidence:
|
||||
'a #RPC_context.simple -> 'a ->
|
||||
branch:Block_hash.t ->
|
||||
op1: Kind.endorsement operation ->
|
||||
op2: Kind.endorsement operation ->
|
||||
unit -> MBytes.t shell_tzresult Lwt.t
|
||||
|
||||
val protocol_data:
|
||||
'a #RPC_context.simple -> 'a ->
|
||||
priority: int ->
|
||||
|
Loading…
Reference in New Issue
Block a user