do not overwrite lockTime input by user.
This commit is contained in:
parent
7f70b573c1
commit
1e0a153b59
@ -101,11 +101,11 @@ TX.prototype._input = function _input(i, index) {
|
||||
var prev = input.out.tx.outputs[input.out.index].script;
|
||||
var lock = bcoin.script.lockTime(prev);
|
||||
if (lock) {
|
||||
this.lock = Math.max(lock.toNumber(), this.lock);
|
||||
// if (this.lock === 0)
|
||||
// this.lock = lock.toNumber();
|
||||
// if (!bcoin.script.spendable(this, this.lock))
|
||||
// throw new Error('Cannot spend ' + utils.revHex(input.out.hash));
|
||||
// this.lock = Math.max(lock.toNumber(), this.lock);
|
||||
if (this.lock === 0)
|
||||
this.lock = lock.toNumber();
|
||||
if (!bcoin.script.spendable(this, this.lock))
|
||||
throw new Error('Cannot spend ' + utils.revHex(input.out.hash));
|
||||
if (input.seq === 0xffffffff)
|
||||
input.seq = 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user