Search in sources :

Example 1 with MinerStatsConverter

use of org.aion.rpc.types.RPCTypesConverter.MinerStatsConverter in project aion by aionnetwork.

the class MiningRPCImplTest method testGetMinerStatsMock.

@Test
public void testGetMinerStatsMock() {
    MinerStats minerStats = execute(buildRequest("getMinerStatistics", AddressParamsConverter.encode(new AddressParams(AddressConverter.decode("0xa0c5bf6c4779bf8c2e0a3ff71353d09b066db2b5876ee2345efb836510b3126b")))), MinerStatsConverter::decode);
    assertNotNull(minerStats);
    assertEquals("1", minerStats.minerHashrate);
    assertEquals("1", minerStats.minerHashrateShare);
    assertEquals("1", minerStats.networkHashRate);
}
Also used : MinerStatsConverter(org.aion.rpc.types.RPCTypesConverter.MinerStatsConverter) AddressParams(org.aion.rpc.types.RPCTypes.AddressParams) MinerStats(org.aion.rpc.types.RPCTypes.MinerStats) Test(org.junit.Test)

Aggregations

AddressParams (org.aion.rpc.types.RPCTypes.AddressParams)1 MinerStats (org.aion.rpc.types.RPCTypes.MinerStats)1 MinerStatsConverter (org.aion.rpc.types.RPCTypesConverter.MinerStatsConverter)1 Test (org.junit.Test)1