swapper-org / NodeChain

Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through APIs. The goal is to allow the user to build their own nodes natively without having to rely on external services.
MIT License
7 stars 5 forks source link

BTC Testnet Bug fix #128

Closed 0xp3gasus closed 2 years ago

0xp3gasus commented 2 years ago

Description

BTC Testnet Bug fix at deployment

Fixes #127

Dependencies (if any)

Type of change

How Has This Been Tested?

---------------------------------------------------
  _  _          _        ___  _                   
 | \| | ___  __| | ___  / __|| |_   __ _ (_) _ _  
 | .` |/ _ \/ _` |/ -_)| (__ | ' \ / _` || || ' \ 
 |_|\_|\___/\__,_|\___| \___||_||_|\__,_||_||_||_|
---------------------------------------------------
===================================================
        CONNECTOR CONFIG
===================================================
Port to start: 80
Port to start (SSL): 443
Starting network nodechain-network.
nodechain-network is already started
Starting connector and reverse proxy... This might take a while.
Connector has been started
Starting btctestnetapi node... This might take a while.
btctestnetapi node started
Do you want to configure your API  [y/N]: n
btc testnet has registered succesfully in the connector
docker ps

CONTAINER ID   IMAGE         COMMAND                  CREATED          STATUS          PORTS                                                                         NAMES
d9623e3e3279   electrum      "/usr/src/app/entryp…"   39 seconds ago   Up 38 seconds   30000/tcp                                                                     btctestnetapi_electrum-testnet_1
22f4aae2617d   electrs       "/build/entrypoint.s…"   40 seconds ago   Up 39 seconds   50001/tcp, 60001/tcp, 60401/tcp                                               btctestnetapi_electrs-testnet_1
ea0e4a165c5a   bitcoincore   "/entrypoint.sh -rpc…"   41 seconds ago   Up 40 seconds   8332-8333/tcp, 18332-18333/tcp, 18443-18444/tcp, 28332/tcp, 38332-38333/tcp   btctestnetapi_bitcoincore-testnet_1
610b3d498b87   nginx         "/docker-entrypoint.…"   48 seconds ago   Up 47 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp      connector_nginx_1
377429b555e3   connector     "/usr/src/app/Connec…"   48 seconds ago   Up 47 seconds   80/tcp, 28332/tcp                                                             connector_connector_1
curl --location --request POST 'http://localhost:80/btc/testnet/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": 1609070896412,
    "method": "syncing",
    "params": {},
    "jsonrpc": "2.0"
}'
{
    "id": 1609070896412,
    "jsonrpc": "2.0",
    "result": {
        "syncing": true,
        "syncPercentage": "0.0001525474339549404%",
        "currentBlockIndex": "96",
        "latestBlockIndex": "1879999"
    }
}

Test Configuration:

Related PR or Docs PR

Docs PR related # Other PR related #

Good practices to consider