Esempio n. 1
0
        public coin_UxOutArray makeUxOutArray(int n)
        {
            var result = new coin_UxOutArray();

            for (int i = 0; i < n; i++)
            {
                result.append(makeUxOut());
            }
            Assert.AreEqual(result.count, n, "Not equal len");
            return(result);
        }
Esempio n. 2
0
        public void TestTransactionVerifyInput()
        {
            // Valid
            var uxOut  = new coin__UxOut();
            var seckey = new cipher_SecKey();
            var result = (uint)makeUxOutWithSecret(uxOut, seckey);

            Assert.AreEqual(result, SKY_OK);
            var handle = new_Transaction__Handlep();

            makeEmptyTransaction(handle);
            var ptx = makeTransactionFromUxOut(uxOut, seckey, handle);

            Assert.AreEqual(result, SKY_OK);
            var ux = new coin_UxOutArray();

            ux.allocate(0);
            ux.append(uxOut);
            result = SKY_coin_VerifyInputSignatures(handle, ux);
            Assert.AreEqual(result, SKY_OK);
        }