nxt.http

## Class GetNextBlockGenerators

- java.lang.Object
- - nxt.http.APIServlet.APIRequestHandler
  - - nxt.http.GetNextBlockGenerators

-     public final class GetNextBlockGenerators
      extends APIServlet.APIRequestHandler

  The GetNextBlockGenerators API will return the next block generators ordered by the hit time. The list of active forgers is initialized using the block generators with at least 2 blocks generated within the previous 10,000 blocks. Accounts without a public key will not be included. The list is updated as new blocks are processed. This means the results will not be 100% correct since previously active generators may no longer be running and new generators won't be known until they generate a block. This API will be replaced when transparent forging is activated.

  Request parameters:

  - limit - The number of forgers to return and defaults to 1.

  Return fields:

  - activeCount - The number of active generators
  - height - The last block height
  - lastBlock - The last block identifier
  - timestamp - The last block timestamp
  - generators - The next block generators
    - account - The account identifier
    - accountRS - The account RS identifier
    - deadline - The difference between the generation time and the last block timestamp
    - effectiveBalanceFXT - The account effective balance
    - hitTime - The generation time for the account

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allowRequiredBlockParameters()` No required block parameters
    `protected boolean` | `isChainSpecific()`
    `protected org.json.simple.JSONStreamAware` | `processRequest(javax.servlet.http.HttpServletRequest req)`

    - ### Methods inherited from class nxt.http.APIServlet.APIRequestHandler

      `getAPITags, getFileParameter, getParameters, isIgnisOnly, isPassword, isTextArea, processRequest, requireBlockchain, requireFullClient, requirePassword, requirePost, startDbTransaction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### processRequest

          protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
                                                            throws NxtException

      Specified by:
        `processRequest` in class `APIServlet.APIRequestHandler`
      Throws:
        `NxtException`

    - #### allowRequiredBlockParameters

          protected boolean allowRequiredBlockParameters()

      No required block parameters
      Overrides:
        `allowRequiredBlockParameters` in class `APIServlet.APIRequestHandler`
      Returns:
        FALSE to disable the required block parameters

    - #### isChainSpecific

          protected boolean isChainSpecific()

      Overrides:
        `isChainSpecific` in class `APIServlet.APIRequestHandler`