From 4508d17d23adc18e9b2e44fe531f8340179ce52c Mon Sep 17 00:00:00 2001 From: David Murdoch Date: Mon, 15 Jun 2020 14:23:33 -0700 Subject: [PATCH] fix: patch fork's sendAsync to add lru-cache --- lib/utils/forkedblockchain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/forkedblockchain.js b/lib/utils/forkedblockchain.js index 0e831db75d..342ce4acee 100644 --- a/lib/utils/forkedblockchain.js +++ b/lib/utils/forkedblockchain.js @@ -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)) {