ergoplatform / oracle-core

Core off-chain component of Oracle Pools
Apache License 2.0
61 stars 37 forks source link

Reward tokens are left in the old oracle box after `update-pool` issued a new oracle tokens #207

Closed greenhat closed 1 year ago

greenhat commented 1 year ago

When updating the pool to change the oracle count, accumulated reward tokens are left in the old oracle box. The reason is that new oracle tokens are minted, and a new wallet scan is created with this new oracle token id as a predicate.

One way to avoid this is to create a new import-pool-update command to import a new oracle_config.yaml instead of putting it manually and deleting scanIds.json. This command will first run extract-reward-tokens code and will send reward tokens to the oracle address before importing the new config. It make sense to do #201 first.