-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fast format * parseInt16 * rpc patch entrypoint * remove fastFormatter.js; pump version --------- Co-authored-by: Kang <kangjianhu@conflux-chain.org>
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Give a chance to change the RPC behavior. | ||
* For example, you may want to use a different responseFormatter for traceBlock. | ||
* @param rpcDef | ||
*/ | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
function emptyPatchRPCMethod(rpcDef) { | ||
// const { method, requestFormatters, responseFormatter } = rpcDef; | ||
} | ||
|
||
let rpcPatch = emptyPatchRPCMethod; | ||
|
||
// set it before initializing a new Conflux instance. | ||
function setPRCMethodPatch(fn) { | ||
rpcPatch = fn; | ||
} | ||
|
||
module.exports = { rpcPatch, setPRCMethodPatch }; |