Test setLocktime

This commit is contained in:
Luke Childs 2019-07-04 17:00:34 +07:00
parent 09a6c37430
commit 871e587711

View file

@ -188,4 +188,14 @@ describe(`Psbt`, () => {
assert.strictEqual(psbt.extractTransaction().version, 1)
})
})
describe('setLocktime', () => {
it('Sets the nLockTime value of the unsigned transaction', () => {
const psbt = new Psbt()
assert.strictEqual(psbt.extractTransaction().locktime, 0)
psbt.setLocktime(1)
assert.strictEqual(psbt.extractTransaction().locktime, 1)
})
})
})