Package nxt.http
Class GetNextBlockGenerators
java.lang.Object
nxt.http.APIServlet.APIRequestHandler
nxt.http.GetNextBlockGenerators
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
Modifier and TypeMethodDescriptionprotected booleanNo required block parametersprotected booleanprotected org.json.simple.JSONStreamAwareprocessRequest(javax.servlet.http.HttpServletRequest req) Methods inherited from class nxt.http.APIServlet.APIRequestHandler
canHaveRecipient, getAPITags, getCreateTransactionTypes, getFileParameters, getParameters, getSensitiveParameters, isIgnisOnly, isTextArea, processRequest, requireBlockchain, requiredBlockUpdateLock, requireFullClient, requirePassword, requirePost, startDbTransaction
-
Method Details
-
processRequest
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req) throws NxtException - Specified by:
processRequestin classAPIServlet.APIRequestHandler- Throws:
NxtException
-
allowRequiredBlockParameters
protected boolean allowRequiredBlockParameters()No required block parameters- Overrides:
allowRequiredBlockParametersin classAPIServlet.APIRequestHandler- Returns:
- FALSE to disable the required block parameters
-
isChainSpecific
protected boolean isChainSpecific()- Overrides:
isChainSpecificin classAPIServlet.APIRequestHandler
-