Merge pull request #4505
d4d3fbd Do not flush the cache after every block outside of IBD (Pieter Wuille)