From 40f0c9116262d8098374649815a37924f6b20d4c Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Fri, 16 May 2014 17:20:45 +1000 Subject: [PATCH] Transaction: use TxIn/TxOut consistently --- src/transaction.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/transaction.js b/src/transaction.js index 7308d1b..7403696 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -293,14 +293,14 @@ Transaction.fromBuffer = function(buffer) { var script = readSlice(scriptLen) var sequence = readUInt32() - ins.push({ + ins.push(new TransactionIn({ outpoint: { hash: hash.toString('hex'), - index: vout, + index: vout }, script: Script.fromBuffer(script), sequence: sequence - }) + })) } var voutLen = readVarInt() @@ -310,10 +310,10 @@ Transaction.fromBuffer = function(buffer) { var scriptLen = readVarInt() var script = readSlice(scriptLen) - outs.push({ + outs.push(new TransactionOut({ value: value, script: Script.fromBuffer(script) - }) + })) } var locktime = readUInt32()