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?
-
I think inconsistency means that the subtangle is invalid, as it contains an invalid transaction– Werner der ChampCommented Feb 15, 2018 at 15:53
-
1I cant find it in the source code, too. Probably a former version. Did you reproduce this error on your own? How?– Tobi MZCommented Feb 15, 2018 at 18:19
-
No, this error is from another post. See the link provided by Tobi.– Jennifer QCommented Feb 16, 2018 at 8:39
Add a comment
|
1 Answer
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
-
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. Commented Feb 16, 2018 at 8:35
-
-
Thanks! In the latest version, I found the code in Snapshot.java Commented Feb 16, 2018 at 9:01