rpc: add FindStorage#805
Conversation
|
@superboyiii could you test it? |
|
@ixje I vote for 1 option |
They're not mutually exclusive. The server could set a maximum and the user could consume it at the maximum size or smaller. The question was whether we should support that or leave it hardcoded as is? |
|
Just FYI, a paging extension to getnepXXtransfers in NeoGo: |
I think it should be set in config.json so can be more flexible. |
|
Tested, works as the expected. |
@superboyiii I changed it so the value is configurable in the config only. Let me know if we want to add user control up to the configured maximum as well |
superboyiii
left a comment
There was a problem hiding this comment.
OK. Now everything is OK for me.
@shargon ☝️ |
|
@ixje I think pageSize should configurable in config.json. Or event have this feature be able to be disabled. Reason being is that with tons of Users requesting to find storage it could slow down the server or timeout requests. |
It is now configurable in the config. Completely disabling can be done through the config by adding the method to the |
|
@shargon Review again please. |
* 'wss' of github.com:Liaojinghui/neo-modules: RpcServer: added GetContractState by contract id support (neo-project#813) rpc: add FindStorage (neo-project#805)
close #758
Arguments:
GetStorage()the first argument is thecontract hashorcontract idsearch prefix, base 64 encoded. Can be set to""to return all storage.startlocationThe
pageSizeis currently fixed to 50. If the find results exceed 50 results it shall return thetruncatedkey set totrueand thenextkey set to thestartlocation of the next page. This way a consumer can directly use the result ofjson["next"]as 3rd parameter to continue where left off.Up for discussion:
pageSizebe configurable in the RpcServer config?pageSizebe configurable as parameter by the invoker?