4

For the error "com.iota.iri.service.TipsManager - Ledger inconsistency detected", does the inconsistency here mean local database corruption? I checked the source code of tip manager and ledgerValidator but it's quite hard to understand. How does that algorithm exactly work?

Jennifer Q
  • 73
  • 3

1 Answers1

3

This error message was removed in April 2017. Thats the reason why you can't find it.

You can fix the issue by deleting your local database. Take a look here.

The code which contains this error message is following:

final Iterator<Map.Entry<Hash, Long>> stateIterator = state.entrySet().iterator();
        while (stateIterator.hasNext()) {

            final Map.Entry<Hash, Long> entry = stateIterator.next();
            if (entry.getValue() <= 0) {

                if (entry.getValue() < 0) {
                    log.error("Ledger inconsistency detected");
                    return null;
                }
                stateIterator.remove();
            }
        }

If there is more you want to know, the code can be found in Mainnet new Release 1.1.2.2.: TipsManager.java

Tobi MZ
  • 1,607
  • 1
  • 12
  • 31
  • Yep, That post is where I first knew this error. I was curious about the error, so I looked into source code. But I couldn't find the error in latest version. Then I made this post to see if anyone knew the reason and detailed algorithm to check ledger inconsistency. – Jennifer Q Feb 16 '18 at 08:35
  • I found the former code for you – Tobi MZ Feb 16 '18 at 08:57
  • Thanks! In the latest version, I found the code in Snapshot.java – Jennifer Q Feb 16 '18 at 09:01