[ecash-herald] Use saved mocks if available
Summary:
Testing of ecash-herald is complicated by API calls used in the npm run generateMocks script. We aren't really interested in these changing API call results (e.g. the utxo set of tested addresses, crypto prices). Some API calls will never change so we shouldn't be making them all the time (blockDetails).
This diff checks blocks.js for saved mocks for a specific blockhash. If they exist, these saved mocks are used instead of live API calls. If they do not exist, live API calls are used.
Test Plan: npm run generateMocks true and blocks.js does not change
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D14230