コード例 #1
0
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            // Check if we need to pay founder fees
            if (coin.HasFounderFee)
            {
                rewardToPool = CreateFounderOutputs(tx, rewardToPool);
            }

            // Check if we need to pay treasury reward
            if (coin.HasTreasuryReward)
            {
                rewardToPool = CreateTreasuryOutputs(tx, rewardToPool);
            }

            tx.Outputs.Add(rewardToPool, poolAddressDestination);

            // CoinbaseDevReward check for Freecash
            if (coin.HasCoinbaseDevReward)
            {
                CreateCoinbaseDevRewardOutputs(tx);
            }

            return(tx);
        }
コード例 #2
0
        protected virtual Transaction CreateMasternodeOutputTransaction()
        {
            var blockReward = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);
            var tx = Transaction.Create(network);

            // outputs
            rewardToPool = CreateMasternodeOutputs(tx, blockReward);

            // Check if we need to pay founder fees
            if (coin.HasFounderFee)
            {
                rewardToPool = CreateFounderOutputs(tx, rewardToPool);
            }

            // Check if we need to pay treasury reward
            if (coin.HasTreasuryReward)
            {
                rewardToPool = CreateTreasuryOutputs(tx, rewardToPool);
            }

            // Finally distribute remaining funds to pool
            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination));

            return(tx);
        }
コード例 #3
0
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            tx.Outputs.Add(rewardToPool, poolAddressDestination);

            return(tx);
        }
コード例 #4
0
        protected override Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue * blockRewardMultiplier, MoneyUnit.Satoshi);

            var tx = Transaction.Create(NBitcoinNetworkType);

            // pool reward (t-addr)
            tx.AddOutput(rewardToPool, poolAddressDestination);

            return(tx);
        }
コード例 #5
0
        protected virtual Transaction CreatePayloadOutputTransaction()
        {
            var blockReward = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);
            var tx          = Transaction.Create(network);

            // Firstly pay coins to pool addr
            tx.Outputs.Insert(0, new TxOut(blockReward, poolAddressDestination));
            // then create payloads incase there is any coinbase_payload in gbt
            CreatePayloadOutputs(tx, rewardToPool);
            return(tx);
        }
コード例 #6
0
    protected override Transaction CreateOutputTransaction()
    {
        rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

        var tx = Transaction.Create(network);

        // pool reward (t-addr)
        tx.Outputs.Add(rewardToPool, poolAddressDestination);

        tx.Inputs.Add(TxIn.CreateCoinbase((int)BlockTemplate.Height));

        return(tx);
    }
コード例 #7
0
ファイル: BitcoinJob.cs プロジェクト: 20dec/miningcore-core
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue * coin.BlockrewardMultiplier, MoneyUnit.Satoshi);

            var tx = Transaction.Create(NBitcoinNetworkType);

            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination)
            {
                Value = rewardToPool
            });

            return(tx);
        }
コード例 #8
0
        protected virtual Transaction CreateMasternodeOutputTransaction()
        {
            var blockReward = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            // outputs
            rewardToPool = CreateMasternodeOutputs(tx, blockReward);

            // Finally distribute remaining funds to pool
            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination));

            return(tx);
        }
コード例 #9
0
ファイル: BitcoinJob.cs プロジェクト: mul1sh/miningcore
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            //Now check if we need to pay founder fees Re PGN pre-dash fork
            if (coin.HasFounderFee)
            {
                rewardToPool = CreateFounderOutputs(tx, rewardToPool);
            }

            tx.Outputs.Add(rewardToPool, poolAddressDestination);

            return(tx);
        }
コード例 #10
0
        protected virtual Transaction CreatePayeeOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            if (payeeParameters?.PayeeAmount > 0)
            {
                var payeeReward = new Money(payeeParameters.PayeeAmount.Value, MoneyUnit.Satoshi);
                rewardToPool -= payeeReward;

                tx.Outputs.Add(payeeReward, BitcoinUtils.AddressToDestination(payeeParameters.Payee, network));
            }

            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination));

            return(tx);
        }
コード例 #11
0
        protected override Transaction CreateOutputTransaction()
        {
            var txNetwork = Network.GetNetwork(networkParams.CoinbaseTxNetwork);
            var tx1       = Transaction.Create(txNetwork);
            var tx        = new ZcashTransaction(tx1.ToHex());

            // set versions
            tx.Version = txVersion;

            overwinterField.SetValue(tx, true);
            versionGroupField.SetValue(tx, txVersionGroupId);

            // pool reward (t-addr)
            rewardToPool = new Money(blockReward + rewardFees, MoneyUnit.Satoshi);
            tx.Outputs.Add(rewardToPool, poolAddressDestination);


            return(tx);
        }
コード例 #12
0
        private const decimal BlockReward         = 250000000m; // Minexcoin has a static block reward

        protected override Transaction CreateOutputTransaction()
        {
            var txFees = BlockTemplate.Transactions.Sum(x => x.Fee);

            rewardToPool = new Money(BlockReward + txFees, MoneyUnit.Satoshi);

            var bankReward = ComputeBankReward(BlockTemplate.Height, rewardToPool);

            rewardToPool -= bankReward;

            var tx = Transaction.Create(network);

            // pool reward
            tx.AddOutput(rewardToPool, poolAddressDestination);

            // bank reward
            tx.AddOutput(bankReward, bankScript);

            return(tx);
        }