Skip to content

Commit

Permalink
rename __disableExcess to __noStrict
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Aug 14, 2015
1 parent 92d1614 commit 94e16fb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Transaction.SIGHASH_NONE = 0x02
Transaction.SIGHASH_SINGLE = 0x03
Transaction.SIGHASH_ANYONECANPAY = 0x80

Transaction.fromBuffer = function (buffer, __disableExcess) {
Transaction.fromBuffer = function (buffer, __noStrict) {
var offset = 0
function readSlice (n) {
offset += n
Expand Down Expand Up @@ -86,9 +86,8 @@ Transaction.fromBuffer = function (buffer, __disableExcess) {

tx.locktime = readUInt32()

if (!__disableExcess) {
if (offset !== buffer.length) throw new Error('Transaction has unexpected data')
}
if (__noStrict) return tx
if (offset !== buffer.length) throw new Error('Transaction has unexpected data')

return tx
}
Expand Down

0 comments on commit 94e16fb

Please sign in to comment.