Exemple #1
0
        private void SetupNodes(IMockChain chain, MockChainNode node1, MockChainNode node2)
        {
            // Get premine
            chain.MineBlocks(10);

            // Send half to other from whoever received premine
            if ((long)node1.WalletSpendableBalance == node1.CoreNode.FullNode.Network.Consensus.PremineReward.Satoshi)
            {
                PayHalfPremine(chain, node1, node2);
            }
            else
            {
                PayHalfPremine(chain, node2, node1);
            }
        }
Exemple #2
0
 private void PayHalfPremine(IMockChain chain, MockChainNode from, MockChainNode to)
 {
     from.SendTransaction(to.MinerAddress.ScriptPubKey, new Money(from.CoreNode.FullNode.Network.Consensus.PremineReward.Satoshi / 2, MoneyUnit.Satoshi));
     from.WaitMempoolCount(1);
     chain.MineBlocks(1);
 }