Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix: patch fork's sendAsync to add lru-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Jun 15, 2020
1 parent 169735b commit 4508d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/forkedblockchain.js
Expand Up @@ -68,7 +68,7 @@ function ForkedBlockchain(options) {
// Patch the `send` method of the underlying fork provider. We can
// simply cache every non-error result because all requests to the
// fork should be deterministic.
this.fork.send = (payload, callback) => {
this.fork.sendAsync = this.fork.send = (payload, callback) => {
const key = JSON.stringify(Object.assign({}, payload, { id: null }));

if (cache.has(key)) {
Expand Down

0 comments on commit 4508d17

Please sign in to comment.