mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-12 10:37:32 +00:00
Update CLI to compare only updated entities and verify IPLD state (#161)
* Change compare CLI to verify only updated entities * Implement IPLD state verification in compare CLI * Changes to IPLD state to match with GQL result entity
This commit is contained in:
@@ -75,9 +75,9 @@
|
||||
./bin/compare-blocks --config-file environments/compare-cli-config.toml --start-block 1 --end-block 10
|
||||
```
|
||||
|
||||
* For comparing entities after fetching ids from one of the endpoints and then querying individually by ids:
|
||||
* For comparing entities after fetching updated entity ids from watcher database:
|
||||
|
||||
* Set the `idsEndpoint` to choose which endpoint the ids should be fetched from.
|
||||
* Set the watcher config file path and entities directory.
|
||||
|
||||
```toml
|
||||
[endpoints]
|
||||
@@ -90,7 +90,20 @@
|
||||
"author",
|
||||
"blog"
|
||||
]
|
||||
idsEndpoint = "gqlEndpoint1"
|
||||
|
||||
[watcher]
|
||||
configPath = "../../graph-test-watcher/environments/local.toml"
|
||||
entitiesDir = "../../graph-test-watcher/dist/entity/*"
|
||||
```
|
||||
|
||||
* To verify diff IPLD state generated at each block, set the watcher endpoint and `verifyState` flag to true
|
||||
|
||||
```toml
|
||||
[watcher]
|
||||
configPath = "../../graph-test-watcher/environments/local.toml"
|
||||
entitiesDir = "../../graph-test-watcher/dist/entity/*"
|
||||
endpoint = "gqlEndpoint2"
|
||||
verifyState = true
|
||||
```
|
||||
|
||||
* Run the CLI with `fetch-ids` flag set to true:\
|
||||
|
||||
Reference in New Issue
Block a user