near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
123 stars 56 forks source link

feat: Add accounts from genesis on start #17

Closed khorolets closed 4 years ago

khorolets commented 4 years ago

Closes #13

Introduce additional parameter to run command --store-genesis (couldn't find better name) to include handling of genesis file on start of indexer.

Currently if activated will run the function that will walk over genesis.records to add records in db with accounts.

~Note If account is already present in db this handler will update created_by_receipt_id and deleted_by_receipt_id by setting them to NULL (assuming account is created in genesis and haven't been deleted), one should carefully use it on Indexer restart.~

@frol let me know what do you think about the behaviour described above.