use of org.aion.rpc.types.RPCTypesConverter.BoolConverter in project aion by aionnetwork.
the class StakingRPCImplTest method testSubmitSignature.
@Test
public void testSubmitSignature() {
assertTrue(execute(new Request(1, "submitsignature", SubmitSignatureParamsConverter.encode(new SubmitSignatureParams(validSignature, validSealHash)), VersionType.Version2), BoolConverter::decode));
assertFalse(execute(new Request(1, "submitsignature", SubmitSignatureParamsConverter.encode(new SubmitSignatureParams(invalidSignature, invalidSealHash)), VersionType.Version2), BoolConverter::decode));
try {
execute(new Request(1, "submitsignature", SubmitSignatureParamsConverter.encode(new SubmitSignatureParams(invalidSignature, missingSealHash)), null), BoolConverter::decode);
fail();
} catch (BlockTemplateNotFoundRPCException e) {
// We expect this exception
}
}
Aggregations