feat: add a simple Crawler example (#453)
While working on Amaru, we'll likely want to grab lots of example data. This adds a small utility to easily grab one block, one tx, or blocks/txs matching some predicate
This commit is contained in:
parent
7c60affea1
commit
af8898b8ec
5 changed files with 168 additions and 0 deletions
9
examples/crawler/README.md
Normal file
9
examples/crawler/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Crawler
|
||||
|
||||
This small example serves both as an example for consuming the chainsync protocol, and a small utility you can customize for one-off crawling tasks.
|
||||
|
||||
By filling in the implementaiton of block_matches or tx_matches, you can easily save any blocks or txs that match some predicate.
|
||||
|
||||
The provided example saves any blocks that have a protocol update request, either at the block level (in byron eras) or the transaction level (in later eras). This was useful in acquiring test data from different environments for Amaru development, for example.
|
||||
|
||||
By replacing that predicate, or implementing the tx predicate, you can crawl the chain for your own needs.
|
||||
Loading…
Add table
Add a link
Reference in a new issue