-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin APIs and tools for node params (without refreshing) #1051
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5af151a
Admin node param APIs
kriii 59c70bd
Fix tools
kriii da41135
Fix integration tests
kriii ce33486
Fix json prc set method set
kriii 9cea149
Fix results
kriii a1611e6
Add wildcard example for tools
kriii bb9dad0
Change set methods value handling as like evironment variable-ish
kriii 5d140ef
Fix tool usages
kriii b02b08d
Add tools for new APIs
kriii 43434cd
Fix typo
kriii cea30fd
Add TODO
kriii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const JSON_RPC_METHODS = { | ||
AIN_ADD_TO_DEV_CLIENT_API_IP_WHITELIST: 'ain_addToDevClientApiIpWhitelist', | ||
AIN_ADD_TO_WHITELIST_NODE_PARAM: 'ain_addToWhitelistNodeParam', | ||
AIN_CHECK_PROTOCOL_VERSION: 'ain_checkProtocolVersion', | ||
AIN_EVAL_RULE: 'ain_evalRule', | ||
AIN_EVAL_OWNER: 'ain_evalOwner', | ||
|
@@ -13,11 +13,11 @@ const JSON_RPC_METHODS = { | |
AIN_GET_BLOCK_TRANSACTION_COUNT_BY_HASH: 'ain_getBlockTransactionCountByHash', | ||
AIN_GET_BLOCK_TRANSACTION_COUNT_BY_NUMBER: 'ain_getBlockTransactionCountByNumber', | ||
AIN_GET_BOOTSTRAP_PUB_KEY: 'ain_getBootstrapPubKey', | ||
AIN_GET_DEV_CLIENT_API_IP_WHITELIST: 'ain_getDevClientApiIpWhitelist', | ||
AIN_GET_EVENT_HANDLER_CHANNEL_INFO: 'ain_getEventHandlerChannelInfo', | ||
AIN_GET_EVENT_HANDLER_FILTER_INFO: 'ain_getEventHandlerFilterInfo', | ||
AIN_GET_LAST_BLOCK: 'ain_getLastBlock', | ||
AIN_GET_LAST_BLOCK_NUMBER: 'ain_getLastBlockNumber', | ||
AIN_GET_NODE_PARAM: 'ain_getNodeParam', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add tool scripts for the new apis? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New tools added! |
||
AIN_GET_NONCE: 'ain_getNonce', | ||
AIN_GET_PENDING_TRANSACTIONS: 'ain_getPendingTransactions', | ||
AIN_GET_PROOF_HASH: 'ain_getProofHash', | ||
|
@@ -41,9 +41,10 @@ const JSON_RPC_METHODS = { | |
AIN_MATCH_FUNCTION: 'ain_matchFunction', | ||
AIN_MATCH_OWNER: 'ain_matchOwner', | ||
AIN_MATCH_RULE: 'ain_matchRule', | ||
AIN_REMOVE_FROM_DEV_CLIENT_API_IP_WHITELIST: 'ain_removeFromDevClientApiIpWhitelist', | ||
AIN_REMOVE_FROM_WHITELIST_NODE_PARAM: 'ain_removeFromWhitelistNodeParam', | ||
AIN_SEND_SIGNED_TRANSACTION: 'ain_sendSignedTransaction', | ||
AIN_SEND_SIGNED_TRANSACTION_BATCH: 'ain_sendSignedTransactionBatch', | ||
AIN_SET_NODE_PARAM: 'ain_setNodeParam', | ||
AIN_VALIDATE_APP_NAME: 'ain_validateAppName', | ||
NET_CONSENSUS_STATUS: 'net_consensusStatus', | ||
NET_GET_CHAIN_ID: 'net_getChainId', | ||
|
@@ -57,13 +58,14 @@ const JSON_RPC_METHODS = { | |
} | ||
|
||
const JSON_RPC_SET_METHOD_SET = new Set([ | ||
JSON_RPC_METHODS.AIN_ADD_TO_DEV_CLIENT_API_IP_WHITELIST, | ||
JSON_RPC_METHODS.AIN_ADD_TO_WHITELIST_NODE_PARAM, | ||
JSON_RPC_METHODS.AIN_INJECT_ACCOUNT_FROM_HD_WALLET, | ||
JSON_RPC_METHODS.AIN_INJECT_ACCOUNT_FROM_KEYSTORE, | ||
JSON_RPC_METHODS.AIN_INJECT_ACCOUNT_FROM_PRIVATE_KEY, | ||
JSON_RPC_METHODS.AIN_REMOVE_FROM_DEV_CLIENT_API_IP_WHITELIST, | ||
JSON_RPC_METHODS.AIN_REMOVE_FROM_WHITELIST_NODE_PARAM, | ||
JSON_RPC_METHODS.AIN_SEND_SIGNED_TRANSACTION, | ||
JSON_RPC_METHODS.AIN_SEND_SIGNED_TRANSACTION_BATCH | ||
JSON_RPC_METHODS.AIN_SEND_SIGNED_TRANSACTION_BATCH, | ||
JSON_RPC_METHODS.AIN_SET_NODE_PARAM | ||
]); | ||
|
||
module.exports = { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make sure to run the unit & integration tests? I think they would need some updates from this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for denoting this! I couldn't think these codes were directly used in the tests. Fixed now!