-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[tontester] Add wrappers for running control queries #1916
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
base: testnet
Are you sure you want to change the base?
Conversation
No behavior change.
This will allow us to do white-box testing of the library in the future.
aa4acf7 to
b3071cc
Compare
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
DanShaders
left a comment
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.
Just an ordinary self-review, nothing to see here.
|
|
||
| ---types--- | ||
| proxyLiteserver.config port:int id:PublicKey = proxyLiteserver.Config; | ||
| engineConsoleClient.config address:string public_key:PublicKey private_key:PrivateKey = engineConsoleClient.Config; |
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.
Rename public_key -> server_public_key; private_key -> client_private_key.
|
|
||
| namespace tonlib { | ||
|
|
||
| class ActorCounter { |
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.
Figure out if stopping a scheduler is fine when there are actors that are stopped but possibly not destroyed. If this is indeed fine, remove ActorCounter and just use std::atomic.
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.
Test?
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.
Test?
| return self._client | ||
|
|
||
| @property | ||
| def engine_console(self) -> EngineConsoleClient: |
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.
Add usage to test_basic.py
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.
Swap this and previous commits.
|
The only implemented control query is
engine.validator.getActorTextStats. One can run it from inside a script viaAdding support for more queries is as easy as adding them to a switch in
is_engine_console_queryintonlib/tonlib/EngineConsoleClient.cppand writing a wrapper intest/tontester/src/tonlib/engine_console.py.