Transaction.deserialize no longer mutates input
This commit is contained in:
parent
02013beda9
commit
baa568697b
2 changed files with 10 additions and 0 deletions
|
@ -282,6 +282,9 @@ Transaction.deserialize = function(buffer) {
|
|||
if (typeof buffer == "string") buffer = new Buffer(buffer, 'hex')
|
||||
else if (Array.isArray(buffer)) buffer = new Buffer(buffer)
|
||||
|
||||
// Copy because we mutate (reverse TxOutHashs)
|
||||
buffer = new Buffer(buffer)
|
||||
|
||||
var offset = 0
|
||||
function readSlice(n) {
|
||||
offset += n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue