Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coin Supply and Masternode info not showing #41

Open
encrypt4d opened this issue Feb 7, 2024 · 3 comments
Open

Coin Supply and Masternode info not showing #41

encrypt4d opened this issue Feb 7, 2024 · 3 comments

Comments

@encrypt4d
Copy link

I am using a dash fork of 20.0.1 version
After setup explorer Coin Supply and Masternode info not showing
2024-02-07_125710
up

@joeuhren
Copy link
Contributor

joeuhren commented Feb 7, 2024

Because the explorer is meant to be somewhat generic, you will need to pay attention to which options are available in the settings.json file and possibly do some trial-and-error to get it working just right for your coin.

The coin supply value is controlled by the sync.supply setting which you can find in the settings.json file here:
image

The default setting is to the use the getinfo cmd which can also be configured from the api_cmds.getinfo setting here:
image

I would recommend that you try running the getinfo cmd in your wallet directly and see if A) it works at all since many coins no longer use the getinfo cmd and B) if it does work, does it return a value that corresponds to the coin supply value?

If it isn't already working then most likely you will need to change how the coin supply is derived. One option is that if the getinfo cmd doesn't work, you can check if the -getinfo cmd is available and if so, you can change the api_cmds.getinfo cmd to -getinfo. If that isn't available then probably try the next sync.supply option which uses the getblockchaininfo cmd to get the coin supply. Again, test that cmd in your wallet first to make sure it seems right, because if you don't see the value you want there, then it's not the correct option for your coin.

If you don't want to play around with checking wallet cmds, you can always just set the sync.supply setting to COINBASE which retrieves the coin supply from the explorer database instead of the wallet.

After changing any settings in the settings.json file, you will need to stop and restart the explorer for the changes to take effect. Also note that the coin supply value is populated at the very beginning of the block sync so you will also need to run another block sync to check if the coin supply populates correctly after that or not.

As for the masternode count panel not populating, the data is pulled from the getmasternodecount cmd by default. Similar to the getinfo cmd, you should run the getmasternodecount cmd in your wallet directly to see if that is the cmd that your wallet uses to get the masternode count. The return data should ideally look something like this:

{
  "total": 101,
  "stable": 100,
  "obfcompat": 100,
  "enabled": 100,
  "inqueue": 93,
  "ipv4": 35,
  "ipv6": 66,
  "onion": 0
}

There were some masternode improvement changes posted less than a week ago which now also work with a masternode count that looks more like this:

98 / 100

That format must be the enabled count / total masternode count.

Let me know if you have any other questions, but ultimately you will need to do some trial-and-error to give the explorer the correct cmds that work with your coin.

@encrypt4d
Copy link
Author

Thanks, it works nice for supply and masternode count
And for showing up masternode list here what do I need to change?
2024-02-10_230016
?

@joeuhren
Copy link
Contributor

Have you tried a masternode sync with npm run sync-masternodes? If that doesn't work you will need to change the api_cmds.getmasternodelist setting to whatever your coin wallets most detailed masternode list cmd is. The ouput should ideally look something like this:

[
  {
    "rank": 95,
    "network": "ipv6",
    "txhash": "c53486cf2608099736c0d561448ef64a1b8e4021d5a479a72cfbf582f48c4da2",
    "outidx": 1,
    "status": "ENABLED",
    "addr": "EU2sWukK7KJiTRPCmT8XPu21DxBdidUtdi",
    "version": 70914,
    "lastseen": 1704843885,
    "activetime": 10275702,
    "lastpaid": 1704843550
  },
  {
    "rank": 96,
    "network": "ipv4",
    "txhash": "6141813996f26e65eb3bdc63b375c640c5372731f98ce570a72804b2125ee052",
    "outidx": 1,
    "status": "ENABLED",
    "addr": "EbeqTtZe57uqCYJjSYMtNtV4chXsuuoiEY",
    "version": 70914,
    "lastseen": 1704843815,
    "activetime": 25414145,
    "lastpaid": 1704840449
  },
  {
    "rank": 97,
    "network": "ipv6",
    "txhash": "c78fe21c0131c5146e4c121de62f712d6a775089954dfd8b88a15637b8b14310",
    "outidx": 0,
    "status": "ENABLED",
    "addr": "ESA7vLuttECENnZRLNqL74ryQs2GNNyMRu",
    "version": 70914,
    "lastseen": 1704844153,
    "activetime": 25512823,
    "lastpaid": 1704840986
  }
]

If you cannot get it working, feel free to post a sample of the ouput from your coins masternode list cmd that I can review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants