Esempio n. 1
0
        public bool TryParseTxIn(ref SequenceReader<byte> r, IKzBlockParser bp)
        {
            if (!_prevout.TryReadOutPoint(ref r)) goto fail;

            bp.TxInStart(this, r.Consumed);

            if (!_scriptSig.TryParseScript(ref r, bp)) goto fail;
            if (!r.TryReadLittleEndian(out _sequence)) goto fail;

            bp.TxInParsed(this, r.Consumed);

            return true;
            fail:
            return false;
        }
Esempio n. 2
0
        public bool TryParseTxOut(ref SequenceReader <byte> r, IKzBlockParser bp)
        {
            if (!r.TryReadLittleEndian(out _value))
            {
                goto fail;
            }

            bp.TxOutStart(this, r.Consumed);

            if (!_scriptPub.TryParseScript(ref r, bp))
            {
                goto fail;
            }

            bp.TxOutParsed(this, r.Consumed);

            return(true);

fail:
            return(false);
        }