diff --git a/test/data/bip69/COPYING b/test/data/bip69/COPYING new file mode 100644 index 00000000..fcf2ae9f --- /dev/null +++ b/test/data/bip69/COPYING @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016 Daniel Cousens + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/test/data/bip69.json b/test/data/bip69/bip69.json similarity index 100% rename from test/data/bip69.json rename to test/data/bip69/bip69.json diff --git a/test/data/core-data/COPYING b/test/data/core-data/COPYING new file mode 100644 index 00000000..45d51c3c --- /dev/null +++ b/test/data/core-data/COPYING @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2009-2017 The Bitcoin Core developers +Copyright (c) 2009-2017 Bitcoin Developers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/test/data/script-tests.json b/test/data/core-data/script-tests.json similarity index 100% rename from test/data/script-tests.json rename to test/data/core-data/script-tests.json diff --git a/test/data/sighash-tests.json b/test/data/core-data/sighash-tests.json similarity index 100% rename from test/data/sighash-tests.json rename to test/data/core-data/sighash-tests.json diff --git a/test/data/tx-invalid.json b/test/data/core-data/tx-invalid.json similarity index 100% rename from test/data/tx-invalid.json rename to test/data/core-data/tx-invalid.json diff --git a/test/data/tx-valid.json b/test/data/core-data/tx-valid.json similarity index 100% rename from test/data/tx-valid.json rename to test/data/core-data/tx-valid.json diff --git a/test/input-test.js b/test/input-test.js index 8fa4f18a..7dcc5196 100644 --- a/test/input-test.js +++ b/test/input-test.js @@ -22,7 +22,8 @@ const input2 = tx2.getRaw().slice(152, 339); const tx3 = common.readTX('tx4'); const input3 = tx3.getRaw().slice(5, 266); -const bip69tests = require('./data/bip69'); +// test files: https://github.com/bitcoinjs/bip69/blob/master/test/fixtures.json +const bip69tests = require('./data/bip69/bip69.json'); describe('Input', function() { it('should return same raw', () => { diff --git a/test/script-test.js b/test/script-test.js index 03f40ac1..2cfe052f 100644 --- a/test/script-test.js +++ b/test/script-test.js @@ -12,7 +12,8 @@ const TX = require('../lib/primitives/tx'); const consensus = require('../lib/protocol/consensus'); const {fromFloat} = require('../lib/utils/fixed'); -const scripts = require('./data/script-tests.json'); +// test files: https://github.com/bitcoin/bitcoin/tree/master/src/test/data +const scripts = require('./data/core-data/script-tests.json'); function isSuccess(stack) { if (stack.length === 0) diff --git a/test/tx-test.js b/test/tx-test.js index 0a83eab7..e7100e07 100644 --- a/test/tx-test.js +++ b/test/tx-test.js @@ -23,9 +23,10 @@ const Address = require('../lib/primitives/address'); const BufferWriter = require('bufio').BufferWriter; const common = require('./util/common'); -const validTests = require('./data/tx-valid.json'); -const invalidTests = require('./data/tx-invalid.json'); -const sighashTests = require('./data/sighash-tests.json'); +// test files: https://github.com/bitcoin/bitcoin/tree/master/src/test/data +const validTests = require('./data/core-data/tx-valid.json'); +const invalidTests = require('./data/core-data/tx-invalid.json'); +const sighashTests = require('./data/core-data/sighash-tests.json'); const tx1 = common.readTX('tx1'); const tx2 = common.readTX('tx2');