public async Task Init(Block block, RevealOperation reveal) { Reveal = reveal; Reveal.Block ??= block; Reveal.Block.Baker ??= Cache.Accounts.GetDelegate(block.BakerId); Reveal.Sender = await Cache.Accounts.GetAsync(reveal.SenderId); Reveal.Sender.Delegate ??= Cache.Accounts.GetDelegate(reveal.Sender.DelegateId); }
public static async Task <RevealsCommit> Revert(ProtocolHandler proto, Block block, RevealOperation op) { var commit = new RevealsCommit(proto); await commit.Init(block, op); await commit.Revert(); return(commit); }