Function Ledger.addPreimage

Add a pre-image information to the validator data

bool addPreimage (
  in ref const(PreImageInfo) preimage
) nothrow @safe;

The Ledger keeps track of "pre-image", which are hashes that validators need to periodically reveal in order to avoid getting financially penalized (slashed).

Two Ledgers at the same height may have different knowledge of pre-images, however they have the same knowledge of pre-images at the height they are at.

Parameters

NameDescription
preimage the pre-image information to add

Returns

true if the pre-image information has been accepted by the Ledger