Transaction: remove TxIn/TxOut clone
This commit is contained in:
parent
a17208a549
commit
b5268465db
@ -332,27 +332,9 @@ function TransactionIn(data) {
|
|||||||
this.sequence = data.sequence == undefined ? DEFAULT_SEQUENCE : data.sequence
|
this.sequence = data.sequence == undefined ? DEFAULT_SEQUENCE : data.sequence
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionIn.prototype.clone = function () {
|
|
||||||
return new TransactionIn({
|
|
||||||
outpoint: {
|
|
||||||
hash: this.outpoint.hash,
|
|
||||||
index: this.outpoint.index
|
|
||||||
},
|
|
||||||
script: this.script,
|
|
||||||
sequence: this.sequence
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function TransactionOut(data) {
|
function TransactionOut(data) {
|
||||||
this.script = data.script
|
this.script = data.script
|
||||||
this.value = data.value
|
this.value = data.value
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionOut.prototype.clone = function() {
|
|
||||||
return new TransactionOut({
|
|
||||||
script: this.script,
|
|
||||||
value: this.value
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = Transaction
|
module.exports = Transaction
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user