use of org.aion.rpc.types.RPCTypes.BlockSpecifierParams in project aion by aionnetwork.
the class OpsRPCImplTest method testOps_getBlockDetails.
@Test
public void testOps_getBlockDetails() {
assertNotNull(execute(new Request(idGenerator.generateID(), "ops_getBlockDetails", BlockSpecifierParamsConverter.encode(new BlockSpecifierParams(new BlockSpecifierUnion(1L))), VersionType.Version2), BlockDetailsConverter::decode));
assertNotNull(execute(new Request(idGenerator.generateID(), "ops_getBlockDetails", BlockSpecifierParamsConverter.encode(BlockSpecifierParamsConverter.decode("[latest]")), VersionType.Version2), BlockDetailsConverter::decode));
assertNotNull(execute(new Request(idGenerator.generateID(), "ops_getBlockDetails", BlockSpecifierParamsConverter.encode(BlockSpecifierParamsConverter.decode("{\"block\": \"" + ByteArray.wrap(emptyPowBlock.getHash()) + "\"}")), VersionType.Version2), BlockDetailsConverter::decode));
}
Aggregations