How should I test the `taproot.spec.ts` file in the project in my localy NodeJS, I got the error infomation below. Thanks very much.
weiyafei-add opened this issue · 10 comments
> bitcoinjs-lib@6.1.5 nobuild:integration
> npm run mocha:ts -- --timeout 50000 'test/integration/taproot.spec.ts'
> bitcoinjs-lib@6.1.5 mocha:ts
> mocha --recursive --require test/ts-node-register --timeout 50000 'test/integration/taproot.spec.ts'
egration/taproot.spec.ts'
bitcoinjs-lib (transaction with taproot)
1) can verify the BIP86 HD wallet vectors for taproot single sig (& sending example)
2) can create (and broadcast via 3PBP) a taproot key-path spend Transaction ng example)
3) can create (and broadcast via 3PBP) a taproot key-path spend Transactionon (with unused scriptTree) on (with unused scriptTree)
4) can create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSIG
5) can create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSEQUENCEVERIFY
6) can create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSIGADD (3-of-3)
7) can create (and broadcast via 3PBP) a taproot script-path spend Transaction - custom finalizer
✔ should fail validating invalid signatures for taproot (See issue #1931) ✔ should succeed validating valid signatures for taproot (See issue #1934)
2 passing (5m)
7 failing
1) bitcoinjs-lib (transaction with taproot)
can verify the BIP86 HD wallet vectors for taproot single sig (& sending example):
Error: connect ETIMEDOUT 66.220.149.18:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
2) bitcoinjs-lib (transaction with taproot)
can create (and broadcast via 3PBP) a taproot key-path spend Transaction:
Error: connect ETIMEDOUT 66.220.149.18:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
3) bitcoinjs-lib (transaction with taproot)
can create (and broadcast via 3PBP) a taproot key-path spend Transaction (with unused scriptTree):
Error: connect ETIMEDOUT 66.220.149.18:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
4) bitcoinjs-lib (transaction with taproot)
can create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSIG:
Error: connect ETIMEDOUT 104.244.43.57:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
5) bitcoinjs-lib (transaction with taproot)
can create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSEQUENCEVERIFY:
Error: connect ETIMEDOUT 104.244.43.57:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
6) bitcoinjs-lib (transaction with taproot)
can create (and broadcast via 3PBP) a taproot script-path spend Transaction - OP_CHECKSIGADD (3-of-3):
Error: connect ETIMEDOUT 104.244.43.57:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
7) bitcoinjs-lib (transaction with taproot)
can create (and broadcast via 3PBP) a taproot script-path spend Transaction - custom finalizer:
Error: connect ETIMEDOUT 104.244.43.57:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Try to update the dependencies and checkout is there any version differences. And alo it looks like there is problem with your IP address try to use VPN or redirection. Check your firewall and proxy settings i think there is issue with web setup as you have this error ETIMEDOUT
@weiyafei-add Can you share also code snippet taproot.spec.ts?
@Andrej656 Thanks you answer me^_^, the code is there https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/taproot.spec.ts. It just a test-file in the project.
I chiefly want to use the code from 22 line to 89 line.
Have you tried to setup network and reset everything?
Yes! I have restarted my network and try to ping the IP given, but it still is ETIMEDOUT. I wang to know if you to run yarn integration
command in your terminal, what will you see?
And I find one thing that every times I got some different IP and totaly can not Ping it.
Will check and get back to you i am on something else now working.Give me one hour
Okay! Thank you very much.
This issue has nothing to do with this library.
You have set a non-default server for the integration tests and that server is down/broken/you-can't-connect-to-it.
The answer to your problem: You need to solve your connection issues.
Alternatively, you can run a docker container locally:
# Pull the image
$ docker pull junderw/bitcoinjs-regtest-server
# Run the image in a container locally in the background
$ docker run -d -p 8080:8080 junderw/bitcoinjs-regtest-server
# Wait for about 10 seconds after starting the container
# Run the tests with the APIURL environment variable (This is just an example for running all integration tests)
$ APIURL=http://localhost:8080/1 npm run integration