Transaction: add sequence parameter to addInput
This commit is contained in:
parent
6ea89eeaae
commit
6c9f95c253
2 changed files with 9 additions and 3 deletions
|
@ -32,7 +32,9 @@ function Transaction() {
|
|||
*
|
||||
* Note that this method does not sign the created input.
|
||||
*/
|
||||
Transaction.prototype.addInput = function(tx, index) {
|
||||
Transaction.prototype.addInput = function(tx, index, sequence) {
|
||||
if (sequence == undefined) sequence = DEFAULT_SEQUENCE
|
||||
|
||||
var hash
|
||||
|
||||
if (typeof tx === 'string') {
|
||||
|
@ -54,7 +56,7 @@ Transaction.prototype.addInput = function(tx, index) {
|
|||
hash: hash,
|
||||
index: index,
|
||||
script: Script.EMPTY,
|
||||
sequence: DEFAULT_SEQUENCE
|
||||
sequence: sequence
|
||||
}) - 1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue