Since https://github.com/ethereum/go-ethereum/pull/21686 the `chainId` API returns an error when the chain is not synced. So use `blockNumber` as a basic function test.