fix(db/trans-cache): avoid recovering a wrong cached data by halibobo1205 · Pull Request #5505 · tronprotocol/java-tron
Avoid downgrading and then upgrading to use the wrong data for cache recovery
For the following cases :
- start node with 4.7.3
- stop node with kill -15 : dump trans-cache data on header x
- start node with 4.7.2
- stop node on header y(y>x)
- start node with 4.7.3: recover trans-cache data with header x, DupTransactionException will possibly occur.
How to fix
Check header when recovering cached data.