alephium / wormhole-fork

A fork of Wormhole bridge to connect to other blockchains
Other
8 stars 4 forks source link

Fallback to the public node service if cannot fetch the latest block … #98

Closed Lbqds closed 7 months ago

Lbqds commented 7 months ago

When fetching the block number through metamask, sometimes metamask may use a cache, which causes the use of a stale block number. And I haven't found any docs about this.

In this PR, if the block number still does not change after 8 minutes(slightly longer than one epoch), it will try to get the block number from the public node RPC service.