force update MTP if tests not run

This commit is contained in:
Daniel Cousens 2018-05-30 10:23:55 +10:00
parent 736bdf64ad
commit 4ed1a49dc5
2 changed files with 13 additions and 3 deletions

View file

@ -1,4 +1,4 @@
/* global describe, it */ /* global describe, it, before */
var assert = require('assert') var assert = require('assert')
var bitcoin = require('../../') var bitcoin = require('../../')
@ -10,7 +10,12 @@ var alice = bitcoin.ECPair.fromWIF('cScfkGjbzzoeewVWmU2hYPUHeVGJRDdFt7WhmrVVGkxp
var bob = bitcoin.ECPair.fromWIF('cMkopUXKWsEzAjfa1zApksGRwjVpJRB3831qM9W4gKZsLwjHXA9x', regtest) var bob = bitcoin.ECPair.fromWIF('cMkopUXKWsEzAjfa1zApksGRwjVpJRB3831qM9W4gKZsLwjHXA9x', regtest)
describe('bitcoinjs-lib (transactions w/ CLTV)', function () { describe('bitcoinjs-lib (transactions w/ CLTV)', function () {
var hashType = bitcoin.Transaction.SIGHASH_ALL // force update MTP
before(function (done) {
regtestUtils.mine(11, done)
})
let hashType = bitcoin.Transaction.SIGHASH_ALL
function cltvCheckSigOutput (aQ, bQ, lockTime) { function cltvCheckSigOutput (aQ, bQ, lockTime) {
return bitcoin.script.compile([ return bitcoin.script.compile([

View file

@ -1,4 +1,4 @@
/* global describe, it */ /* global describe, it, before */
let assert = require('assert') let assert = require('assert')
let bitcoin = require('../../') let bitcoin = require('../../')
@ -10,6 +10,11 @@ let alice = bitcoin.ECPair.fromWIF('cScfkGjbzzoeewVWmU2hYPUHeVGJRDdFt7WhmrVVGkxp
let bob = bitcoin.ECPair.fromWIF('cMkopUXKWsEzAjfa1zApksGRwjVpJRB3831qM9W4gKZsLwjHXA9x', regtest) let bob = bitcoin.ECPair.fromWIF('cMkopUXKWsEzAjfa1zApksGRwjVpJRB3831qM9W4gKZsLwjHXA9x', regtest)
describe('bitcoinjs-lib (transactions w/ CSV)', function () { describe('bitcoinjs-lib (transactions w/ CSV)', function () {
// force update MTP
before(function (done) {
regtestUtils.mine(11, done)
})
let hashType = bitcoin.Transaction.SIGHASH_ALL let hashType = bitcoin.Transaction.SIGHASH_ALL
// IF MTP (from when confirmed) > seconds, aQ can redeem // IF MTP (from when confirmed) > seconds, aQ can redeem