aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-22 23:54:13 +0800
committerFabio Berger <me@fabioberger.com>2018-03-22 23:54:13 +0800
commitde8450d5c93c5b46d227325ca225eadce9610af0 (patch)
tree830a70884a13de56acae365a996ef6e089a92a5e /packages/sol-cov
parentbcb9ee4cc2531660847046c575b9a4e57f82ced7 (diff)
downloaddexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.tar
dexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.tar.gz
dexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.tar.bz2
dexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.tar.lz
dexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.tar.xz
dexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.tar.zst
dexon-sol-tools-de8450d5c93c5b46d227325ca225eadce9610af0.zip
Make handleRequest public and add comment for it
Diffstat (limited to 'packages/sol-cov')
-rw-r--r--packages/sol-cov/src/coverage_subprovider.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/sol-cov/src/coverage_subprovider.ts b/packages/sol-cov/src/coverage_subprovider.ts
index fc06720de..37682c45f 100644
--- a/packages/sol-cov/src/coverage_subprovider.ts
+++ b/packages/sol-cov/src/coverage_subprovider.ts
@@ -49,9 +49,16 @@ export class CoverageSubprovider extends Subprovider {
public async writeCoverageAsync(): Promise<void> {
await this._coverageManager.writeCoverageAsync();
}
- // This method must conform to the web3-provider-engine interface
- // tslint:disable-next-line:prefer-function-over-method underscore-private-and-protected
- private handleRequest(payload: Web3.JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) {
+ /**
+ * This method conforms to the web3-provider-engine interface.
+ * It is called internally by the ProviderEngine when it is this subproviders
+ * turn to handle a JSON RPC request.
+ * @param payload JSON RPC payload
+ * @param next Callback to call if this subprovider decides not to handle the request
+ * @param end Callback to call if subprovider handled the request and wants to pass back the request.
+ */
+ // tslint:disable-next-line:prefer-function-over-method
+ public handleRequest(payload: Web3.JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) {
switch (payload.method) {
case 'eth_sendTransaction':
const txData = payload.params[0];