Пример #1
0
		/**
		 * Used only in creation of the genesis block.
		 */
		TransactionInput(NetworkParameters params, Transaction parentTransaction, byte[] scriptBytes) {
			super(params);
			this.scriptBytes = scriptBytes;
			this.outpoint = new TransactionOutPoint(params, NO_SEQUENCE, (Transaction)null);
			this.sequence = NO_SEQUENCE;
			this.parentTransaction = parentTransaction;

			length = 40 + (scriptBytes == null ? 1 : VarInt.SizeInBytesOf(scriptBytes.Length) + scriptBytes.length);
		}
Пример #2
0
        /**
         * Used only in creation of the genesis block.
         */
        TransactionInput(NetworkParameters params, Transaction parentTransaction, byte[] scriptBytes)
        {
            super(params);
            this.scriptBytes       = scriptBytes;
            this.outpoint          = new TransactionOutPoint(params, NO_SEQUENCE, (Transaction)null);
            this.sequence          = NO_SEQUENCE;
            this.parentTransaction = parentTransaction;

            length = 40 + (scriptBytes == null ? 1 : VarInt.SizeInBytesOf(scriptBytes.Length) + scriptBytes.length);
        }
Пример #3
0
		/**
		 * Creates an UNSIGNED input that links to the given output
		 */
		TransactionInput(NetworkParameters params, Transaction parentTransaction, TransactionOutput output) {
			super(params);
			long outputIndex = output.getIndex();
			outpoint = new TransactionOutPoint(params, outputIndex, output.parentTransaction);
			scriptBytes = EMPTY_ARRAY;
			sequence = NO_SEQUENCE;
			this.parentTransaction = parentTransaction;

			length = 41;
		}
Пример #4
0
		public TransactionInput(NetworkParameters params, Transaction parentTransaction,
				byte[] scriptBytes,
				TransactionOutPoint outpoint) {
			super(params);
			this.scriptBytes = scriptBytes;
			this.outpoint = outpoint;
			this.sequence = NO_SEQUENCE;
			this.parentTransaction = parentTransaction;

			length = 40 + (scriptBytes == null ? 1 : VarInt.sizeOf(scriptBytes.length) + scriptBytes.length);
		}
Пример #5
0
        /**
         * Creates an UNSIGNED input that links to the given output
         */
        TransactionInput(NetworkParameters params, Transaction parentTransaction, TransactionOutput output)
        {
            super(params);
            long outputIndex = output.getIndex();

            outpoint               = new TransactionOutPoint(params, outputIndex, output.parentTransaction);
            scriptBytes            = EMPTY_ARRAY;
            sequence               = NO_SEQUENCE;
            this.parentTransaction = parentTransaction;

            length = 41;
        }
Пример #6
0
        public TransactionInput(NetworkParameters params, Transaction parentTransaction,
                                byte[] scriptBytes,
                                TransactionOutPoint outpoint)
        {
            super(params);
            this.scriptBytes       = scriptBytes;
            this.outpoint          = outpoint;
            this.sequence          = NO_SEQUENCE;
            this.parentTransaction = parentTransaction;

            length = 40 + (scriptBytes == null ? 1 : VarInt.sizeOf(scriptBytes.length) + scriptBytes.length);
        }