# Blockchain health check

**1. Check the block count from the local wallet:**

![](https://1656297259-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXpIa_undrOYkGQm38v%2F-LdOxgJxLJ7iQx5ZFfUR%2F-LdOyqW4ckD033KWwgfU%2FENGblckchainhealth1.png?alt=media\&token=212a489c-eeb2-4127-8200-e4baf3bd0686)

Compare it to the one of the blockchain explorer @ [https://chain.review/​](https://explorer.win.win/)

![](https://1656297259-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXpIa_undrOYkGQm38v%2F-LdOxgJxLJ7iQx5ZFfUR%2F-LdOyrnV0ed4X7kzU0id%2FENGblckchainhealth2.png?alt=media\&token=541472fa-d7ca-42db-a431-ffc65f583603)

You can also compare it to the second explorer @ <https://explorer.win.win/>

**The current block must match.**\
If they don’t match, here’s what to do:

* Check the version of your wallet at Tools > Information and make sure it is the latest one available at <https://github.com/NewCapital/TWINS-Core/releases>.
* Next, close the wallet and delete the following .dat files: **peers.dat**, **banlist.dat**, **mnpayments.dat**.&#x20;
  * If you are using Windows you will find the files in the "%appdata%/TWINS" folder.
  * If you are using Linux you will find the files in the /YourUserName/.twins folder
  * If you are using a Mac, you will find these files in the /Users/YourUserName/Library/Application Support/TWINS folder

![](https://1656297259-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXpIa_undrOYkGQm38v%2F-LdOxgJxLJ7iQx5ZFfUR%2F-LdOywO2KDDaW0drD8gZ%2FENGblckchainhealth4.png?alt=media\&token=113eb257-39fa-4b69-9487-b6e721637872)

* Delete the directories **blocks** and **chainstate**.
* Then do a full resync by restarting the wallet.

\-  The wallet will find new peer connections. Go to Tools > Peers list and see if you have any peers running with an older version. If you do, right-click on them and choose "Ban Node for 1 year":

![](https://1656297259-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXpIa_undrOYkGQm38v%2F-LdOxgJxLJ7iQx5ZFfUR%2F-LdOyuXglUUi7FP6h51Y%2FENGblckchainhealth3.png?alt=media\&token=27ecb96d-3173-48e4-8c8c-1669ef5770af)

**2. Check the blockcount on your masternode wallets on your VPS (remote wallet):**

For those using the Nodemaster script:

*twins-cli -conf=/etc/masternodes/twins\_nX.conf getblockcount*

For the normal script:

*./twins-cli getblockcount*

And compare it to what explorer says. If they match you are good. If they don’t, you’ll need to do a full resync of your MN with the TWINS blockchain as follows:

If you are using the Nodemaster script:&#x20;

A. Delete the blockchain folders called “blocks” and “chainstate”. Located in /var/lib/masternodes/twinsX if you are running the nodemaster script (X is the number of your masternode)

B. Delete the .dat files **banlist.dat, mnpayment.dat, peers.dat** located in the same folder.

Then do a full a resync by stopping and starting the twins daemon:

systemctl daemon-reload \
systemctl enable twins\_nX \
systemctl restart twins\_nX

If you are not running the nodemaster script, the files that must be deleted are located in the /YourUserName/.twins folder and the command to stop and restart the twins daemon should be:

./twins-cli stop \
./twinsd *or* ./twinsd -daemon

**Another way to verify that you are on the right chain is to run:**

“getblockhash \<any\_high\_block\_number>” from the local wallet in debug console and “twins-cli -conf=/etc/masternodes/twins\_nX.conf getblockhash \<same\_high\_block\_number>” from the MN.

Then see if the hash matches with what the TWINS explorer says.
