How to verify if you are on the correct Chain?

Introduction

There are several possible reasons for a network split, which can cause some wallets to move off chain. If you want to know more about how the network basics work, read my previous article. We will only cover ways to ensure you are on the right chain here.

GUI Wallet

The GUI wallet is your graphical user interface. If you have a staking wallet and suddenly receive a tremendous amount of stakes you weren’t getting before, then this is your first indicator you are on a side-chain. Under the “tools” option you will find helpful options we will use now.

The two marked options will be used most commonly if you have a wallet problem

Verify the Chain with Debug Console

To verify you are on the right chain go to the explorer and click on one of the last 3 generated blocks

Just click on the block number of one of the lastest blocks
Now copy the long blockhash (only the very long string) and open the debug console
The getblock command will give you information about the block with the hash you entered. If it looks like the above, you are on the chain that the block explorer is on, which is in most cases the majority and therefore correct chain.
If you see this you are not on the correct chain!

Getting back to the correct chain with a Bootstrap

A Bootstrap is an archive which includes the chain files every wallet writes. It is normaly faster to apply a bootstrap than to resync from scratch (see next part). You will first have to download the file, which you can always find in our discord under #links -> latest bootstrap

Download the file here.

Now stop your wallet and locate the files of the wallet. Open your file browser and put %appdata%\Roaming\BitcoinGreen into the address line and hit enter.

You will find all the files you need in this folder. The wallet.dat includes all your coins. Never lose it or give anyone access!

The bootstrap you just downloaded contains the two folders “chainstate” and “blocks”. Delete those from your folder and put the files from the archive into the folder.

If you restart your wallet now it will sync to the latest blocks. If it is finished syncing, try again if you are on the right chain. If your are not on the right chain, try again. If that does not work, ask for help in the help rooms or try the next possible way. NEVER ANSWER ANYONE WHO DIRECT MESSAGES YOU! THERE ARE A LOT OF PEOPLE TRYING TO STEAL COINS!

Resyncing from scratch

Resyncing from scratch takes a little longer and there are 2 ways to do it. One is to delete the following files manually (Close your wallet before). This way also works for most wallet problems if the chain is somehow corrupted so that you cannot open your wallet.

Leave all .conf, wallet.dat, peers.dat and the backups folder

For the second way, we open the wallet repair tab from tools (see above)

Just click the marked button and your wallet will restart shortly after-

Now just wait for it to resync. This can take a while. If it is finished verify you are on the correct chain!

Verify your Masternodes

The process is pretty much the same but we need to use the CLI (Command line interface) in order to do this now. First log in to your VPS with putty or what ever you like the most. As before, get a blockhash and we will try to find the block in our masternode wallet.

bitcoingreen-cli_ALIAS.sh getblock <blockhash>

My masternode aliases are just numbers 01, 02, 03 etc. If you followed the offical guide then this will be mn1, mn2, mn3,… for you or anything you typed in when it asked you (Its always lower case — if you typed MN1 its mn1).

If you get something similar to the above, this node is fine. You will have to do this for ALL your nodes because they all have an individual blockchain even if they’re on the same server.

If you get an error like this you are on the wrong chain:

Resync the CLI-Wallet

In case you are on the wrong chain now you will have to resync and stop your wallet first, and restart it with the -resync option:

Use the “stop” wallet command and wait 10 seconds before you proceed
Start the wallet now with the “-resync” option attached. Note that you use the bitcoingreend_alias.sh now and not the cli. The cli is just an interface to access the daemon. To start it, the above command is needed.
You have to wait till it is resynced now. This takes some time. You can see the blockcount with “getinfo.” Wait till it matches the blockexplorer.

After resync it MIGHT be necessary to restart the masternode on the gui, but it’s not always so. Just wait some hours and see if the status of your masternode goes missing in the gui. If you restart it on the gui and check the status on VPS:

Use the “masternode status” wallet command to see if your masternode is started.

Warning:

So folks, a final warning. If you have any problems, visit the discord and ask your questions in the help channels. For your own sake and safety, keep discussions in the help channels. It is really easy to impersonate other people, like, everywhere. In emails, discord, telegram.

You can never be sure to who you’re talking to and therefore shouldn’t answer anyone offering help in your direct messages. In Bitcoin Green, all admins are green or blue. If they DM you, then you cannot see if they are green or blue anymore and it’s well possible it’s not who you think. You can change your name to anything you want, even to a name that another one already has. So please use the help channels. They’re also the fastest way to get help.

DON’T PUT THE walletdump COMMAND IN YOUR DEBUG CONSOLE AND SEND THE OUTPUT ANYWHERE! YOU WILL LOSE YOUR COINS!