Package io.nem.sdk.openapi.vertx.api
Class ChainRoutesApiImpl
- java.lang.Object
-
- io.nem.sdk.openapi.vertx.api.ChainRoutesApiImpl
-
- All Implemented Interfaces:
ChainRoutesApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2019-11-23T10:26:45.594287+01:00[Europe/Madrid]") public class ChainRoutesApiImpl extends java.lang.Object implements ChainRoutesApi
-
-
Constructor Summary
Constructors Constructor Description ChainRoutesApiImpl()ChainRoutesApiImpl(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiClientgetApiClient()voidgetChainHeight(io.vertx.core.Handler<io.vertx.core.AsyncResult<HeightInfoDTO>> resultHandler)Get the current height of the chain Returns the current height of the blockchain.voidgetChainScore(io.vertx.core.Handler<io.vertx.core.AsyncResult<ChainScoreDTO>> resultHandler)Get the current score of the chain Gets the current score of the blockchain.voidsetApiClient(ApiClient apiClient)
-
-
-
Constructor Detail
-
ChainRoutesApiImpl
public ChainRoutesApiImpl()
-
ChainRoutesApiImpl
public ChainRoutesApiImpl(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
getChainHeight
public void getChainHeight(io.vertx.core.Handler<io.vertx.core.AsyncResult<HeightInfoDTO>> resultHandler)
Get the current height of the chain Returns the current height of the blockchain.- Specified by:
getChainHeightin interfaceChainRoutesApi- Parameters:
resultHandler- Asynchronous result handler
-
getChainScore
public void getChainScore(io.vertx.core.Handler<io.vertx.core.AsyncResult<ChainScoreDTO>> resultHandler)
Get the current score of the chain Gets the current score of the blockchain. The higher the score, the better the chain. During synchronization, nodes try to get the best blockchain in the network. The score for a block is derived from its difficulty and the time (in seconds) that has elapsed since the last block: block score = difficulty − time elapsed since last block- Specified by:
getChainScorein interfaceChainRoutesApi- Parameters:
resultHandler- Asynchronous result handler
-
-