public override BlockTemplate CreateNewBlock(Script scriptPubKeyIn, bool fMineWitnessTx = true) { this.logger.LogTrace("({0}.{1}:{2},{3}:{4})", nameof(scriptPubKeyIn), nameof(scriptPubKeyIn.Length), scriptPubKeyIn.Length, nameof(fMineWitnessTx), fMineWitnessTx); base.CreateNewBlock(scriptPubKeyIn, fMineWitnessTx); this.coinbase.Outputs[0].ScriptPubKey = new Script(); this.coinbase.Outputs[0].Value = Money.Zero; IPosConsensusValidator posValidator = this.consensusLoop.Validator as IPosConsensusValidator; Guard.NotNull(posValidator, nameof(posValidator)); this.logger.LogTrace("(-)"); return(this.pblocktemplate); }
public override BlockTemplate Build(ChainedBlock chainTip, Script scriptPubKey) { this.logger.LogTrace("({0}:'{1}',{2}.{3}:{4})", nameof(chainTip), chainTip, nameof(scriptPubKey), nameof(scriptPubKey.Length), scriptPubKey.Length); this.OnBuild(chainTip, scriptPubKey); this.coinbase.Outputs[0].ScriptPubKey = new Script(); this.coinbase.Outputs[0].Value = Money.Zero; IPosConsensusValidator posValidator = this.ConsensusLoop.Validator as IPosConsensusValidator; Guard.NotNull(posValidator, nameof(posValidator)); this.logger.LogTrace("(-)"); return(this.BlockTemplate); }