BoostryJP / ibet-Wallet-API

A powerful API suite for seamlessly building ibet blockchain wallet systems 🛠
https://ibet.jp/ibet-for-fin
Apache License 2.0
9 stars 0 forks source link

[FEATURE] Change default value of `BLOCK_SYNC_REMAINING_THRESHOLD` #1255

Closed purplesmoke05 closed 1 year ago

purplesmoke05 commented 1 year ago

Is your feature request related to a problem? Please describe.

The current implementation of blockchain monitoring judges a "data synchronization delay" when the difference between the highestBlock and the currentBlock is more than 1.(it is defined by BLOCK_SYNC_REMAINING_THRESHOLD and the defualt value is 1.)

https://github.com/BoostryJP/ibet-Wallet-API/blob/2ee9d161506b2c92d990ffc8dfcdd106cfb51f84/app/config.py#L67-L69

This threshold is too strict.

現在のブロックチェーン監視の実装では、highBlockとcurrentBlockの差が1を超える場合に「データ同期遅延」と判断しています (BLOCK_SYNC_REMAINING_THRESHOLDで定義されていて、デフォルト値は1です)。 この閾値は厳しすぎます。

Describe the solution you'd like

Change the default value of BLOCK_SYNC_REMAINING_THRESHOLD to 2 or more.

BLOCK_SYNC_REMAINING_THRESHOLDのデフォルト値を2に変更します。