Package nxt.http
Class GetNextBlockGeneratorsTemp
- java.lang.Object
-
- nxt.http.APIServlet.APIRequestHandler
-
- nxt.http.GetNextBlockGeneratorsTemp
-
public final class GetNextBlockGeneratorsTemp 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
- effectiveBalanceNXT - The account effective balance
- hitTime - The generation time for the account
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
allowRequiredBlockParameters()
No required block parametersprotected org.json.simple.JSONStreamAware
processRequest(javax.servlet.http.HttpServletRequest req)
-
Methods inherited from class nxt.http.APIServlet.APIRequestHandler
getAPITags, getFileParameter, getParameters, isPassword, isTextArea, processRequest, requireBlockchain, requireFullClient, requirePassword, requirePost, startDbTransaction
-
-
-
-
Method Detail
-
processRequest
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req) throws NxtException
- Specified by:
processRequest
in classAPIServlet.APIRequestHandler
- Throws:
NxtException
-
allowRequiredBlockParameters
protected boolean allowRequiredBlockParameters()
No required block parameters- Overrides:
allowRequiredBlockParameters
in classAPIServlet.APIRequestHandler
- Returns:
- FALSE to disable the required block parameters
-
-