[bugfix] smarter thorchain block height querying

Noticed that in a high volumen scenario, we can get into trouble hitting thorchain API rate limiting scenarios, which causes bifrost to be slower.

Instead of querying thorchain for its block height on every transaction to sign, we only updated if the last height we got is within 300 signing blocks. This should mean at most we query thorchain for block height once per block, rather than once per tx to sign. It also means, if we are iterating through 1000's of old transactions from thousands of blocks ago, we should churn through and skip them really fast.

Merge request reports

Loading