1 timeout to rule them all
This commit is contained in:
parent
77bb5f9bf8
commit
ad6fa57a6d
7 changed files with 1 additions and 35 deletions
test/integration
|
@ -12,7 +12,6 @@ const bob = bitcoin.ECPair.fromWIF('cMkopUXKWsEzAjfa1zApksGRwjVpJRB3831qM9W4gKZs
|
|||
describe('bitcoinjs-lib (transactions w/ CLTV)', function () {
|
||||
// force update MTP
|
||||
before(function (done) {
|
||||
this.timeout(30000)
|
||||
regtestUtils.mine(11, done)
|
||||
})
|
||||
|
||||
|
@ -41,8 +40,6 @@ describe('bitcoinjs-lib (transactions w/ CLTV)', function () {
|
|||
|
||||
// expiry past, {Alice's signature} OP_TRUE
|
||||
it('can create (and broadcast via 3PBP) a Transaction where Alice can redeem the output after the expiry (in the past)', function (done) {
|
||||
this.timeout(30000)
|
||||
|
||||
// 3 hours ago
|
||||
const lockTime = bip65.encode({ utc: utcNow() - (3600 * 3) })
|
||||
const redeemScript = cltvCheckSigOutput(alice, bob, lockTime)
|
||||
|
@ -86,8 +83,6 @@ describe('bitcoinjs-lib (transactions w/ CLTV)', function () {
|
|||
|
||||
// expiry will pass, {Alice's signature} OP_TRUE
|
||||
it('can create (and broadcast via 3PBP) a Transaction where Alice can redeem the output after the expiry (in the future)', function (done) {
|
||||
this.timeout(30000)
|
||||
|
||||
regtestUtils.height(function (err, height) {
|
||||
if (err) return done(err)
|
||||
|
||||
|
@ -142,8 +137,6 @@ describe('bitcoinjs-lib (transactions w/ CLTV)', function () {
|
|||
|
||||
// expiry ignored, {Bob's signature} {Alice's signature} OP_FALSE
|
||||
it('can create (and broadcast via 3PBP) a Transaction where Alice and Bob can redeem the output at any time', function (done) {
|
||||
this.timeout(30000)
|
||||
|
||||
// two hours ago
|
||||
const lockTime = bip65.encode({ utc: utcNow() - (3600 * 2) })
|
||||
const redeemScript = cltvCheckSigOutput(alice, bob, lockTime)
|
||||
|
@ -188,8 +181,6 @@ describe('bitcoinjs-lib (transactions w/ CLTV)', function () {
|
|||
|
||||
// expiry in the future, {Alice's signature} OP_TRUE
|
||||
it('can create (but fail to broadcast via 3PBP) a Transaction where Alice attempts to redeem before the expiry', function (done) {
|
||||
this.timeout(30000)
|
||||
|
||||
// two hours from now
|
||||
const lockTime = bip65.encode({ utc: utcNow() + (3600 * 2) })
|
||||
const redeemScript = cltvCheckSigOutput(alice, bob, lockTime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue