Mavryk_raw_protocol_alpha.Pending_denunciations_storage
This module deals with pending denunciations before they are used to slash delegates.
This module is responsible for maintaining the table Storage.Pending_denunciations
In particular, it maintains the invariant that no key is pointing to an empty denunciation list.
val find :
Raw_context.t ->
Mavryk_protocol_environment_alpha.Signature.public_key_hash ->
Denunciations_repr.item list
Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.t
Returns the pending denunciations list of the given delegate. It returns an empty list if none are registered.
val add_denunciation :
Raw_context.t ->
misbehaving_delegate:
Mavryk_protocol_environment_alpha.Signature.public_key_hash ->
Mavryk_protocol_environment_alpha.Operation_hash.t ->
rewarded_delegate:Mavryk_protocol_environment_alpha.Signature.public_key_hash ->
Misbehaviour_repr.t ->
Raw_context.t Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.t
Add a denunciation in the list of the given delegate
val set_denunciations :
Raw_context.t ->
Mavryk_protocol_environment_alpha.Signature.public_key_hash ->
Denunciations_repr.t ->
Raw_context.t Mavryk_protocol_environment_alpha.Lwt.t
Set the denunciation list of the given delegate. Previously set denunciations would be erased.
val has_pending_denunciations :
Raw_context.t ->
Mavryk_protocol_environment_alpha.Signature.public_key_hash ->
bool Mavryk_protocol_environment_alpha.Lwt.t
Tells if the given delegate has some pending denunciations
val fold :
Raw_context.t ->
order:[ `Sorted | `Undefined ] ->
init:'a ->
f:
(Mavryk_protocol_environment_alpha.Signature.public_key_hash ->
Denunciations_repr.item list ->
'a ->
'a Mavryk_protocol_environment_alpha.Lwt.t) ->
'a Mavryk_protocol_environment_alpha.Lwt.t
val clear :
Raw_context.t ->
Raw_context.t Mavryk_protocol_environment_alpha.Lwt.t
module For_RPC : sig ... end