[perf] Fetch keys of mempool history maps outside of loop.
Merge pull request #24 from bjd/perf

[perf] Fetch keys of mempool history maps outside of loop.