Exemple #1
0
        public static bool LockUnspent()
        {
            Console.WriteLine("Starting LockUnspent tests...");

            Bitcoind.RawTxInput[] inputs1 = new Bitcoind.RawTxInput[1];
            Bitcoind.RawTxInput   input1  = new Bitcoind.RawTxInput();
            input1.txID = "fff17832d351c12476dc3d6f902fd2e0666992135ffe49ac343d9db15dfcddf7";
            input1.vout = "0";
            inputs1 [0] = input1;

            Bitcoind.RawTxInput[] inputs2 = new Bitcoind.RawTxInput[2];
            Bitcoind.RawTxInput   input2  = new Bitcoind.RawTxInput();
            input2.txID = "f7d882aea4204b2dbe2d3941c1ee280c7c34551f005f5e7ef52f4c19cfea3db8";
            input2.vout = "0";
            inputs2 [0] = input1;
            inputs2 [1] = input2;

            Console.WriteLine("LockUnspent: " + Bitcoind.LockUnspent(false));
            Console.WriteLine("LockUnspent: " + Bitcoind.LockUnspent(true));
            Console.WriteLine("LockUnspent: " + Bitcoind.LockUnspent(false, inputs1));
            Console.WriteLine("LockUnspent: " + Bitcoind.LockUnspent(true, inputs1));
            Console.WriteLine("LockUnspent: " + Bitcoind.LockUnspent(false, inputs2));
            Console.WriteLine("LockUnspent: " + Bitcoind.LockUnspent(true, inputs2));

            return(true);
        }