|
|
@ -105,7 +105,8 @@ public class ProposalPayloadValidatorTest { |
|
|
|
eq(protocolContext), |
|
|
|
eq(protocolContext), |
|
|
|
eq(block), |
|
|
|
eq(block), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.FULL))) |
|
|
|
eq(HeaderValidationMode.FULL), |
|
|
|
|
|
|
|
eq(false))) |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isTrue(); |
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isTrue(); |
|
|
@ -129,7 +130,8 @@ public class ProposalPayloadValidatorTest { |
|
|
|
eq(protocolContext), |
|
|
|
eq(protocolContext), |
|
|
|
eq(block), |
|
|
|
eq(block), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.FULL))) |
|
|
|
eq(HeaderValidationMode.FULL), |
|
|
|
|
|
|
|
eq(false))) |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isTrue(); |
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isTrue(); |
|
|
@ -152,7 +154,8 @@ public class ProposalPayloadValidatorTest { |
|
|
|
eq(protocolContext), |
|
|
|
eq(protocolContext), |
|
|
|
eq(block), |
|
|
|
eq(block), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.FULL))) |
|
|
|
eq(HeaderValidationMode.FULL), |
|
|
|
|
|
|
|
eq(false))) |
|
|
|
.thenReturn(new BlockProcessingResult("Failed")); |
|
|
|
.thenReturn(new BlockProcessingResult("Failed")); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isFalse(); |
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isFalse(); |
|
|
@ -228,7 +231,8 @@ public class ProposalPayloadValidatorTest { |
|
|
|
eq(protocolContext), |
|
|
|
eq(protocolContext), |
|
|
|
eq(block), |
|
|
|
eq(block), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.FULL))) |
|
|
|
eq(HeaderValidationMode.FULL), |
|
|
|
|
|
|
|
eq(false))) |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isFalse(); |
|
|
|
assertThat(payloadValidator.validate(proposal.getSignedPayload())).isFalse(); |
|
|
@ -262,7 +266,8 @@ public class ProposalPayloadValidatorTest { |
|
|
|
eq(protocolContext), |
|
|
|
eq(protocolContext), |
|
|
|
eq(block), |
|
|
|
eq(block), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.FULL))) |
|
|
|
eq(HeaderValidationMode.FULL), |
|
|
|
|
|
|
|
eq(false))) |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
when(cmsValidator.validate(eq(cms), eq(hashWithoutCms))).thenReturn(false); |
|
|
|
when(cmsValidator.validate(eq(cms), eq(hashWithoutCms))).thenReturn(false); |
|
|
|
|
|
|
|
|
|
|
@ -297,7 +302,8 @@ public class ProposalPayloadValidatorTest { |
|
|
|
eq(protocolContext), |
|
|
|
eq(protocolContext), |
|
|
|
eq(block), |
|
|
|
eq(block), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.LIGHT), |
|
|
|
eq(HeaderValidationMode.FULL))) |
|
|
|
eq(HeaderValidationMode.FULL), |
|
|
|
|
|
|
|
eq(false))) |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
.thenReturn(new BlockProcessingResult(Optional.empty())); |
|
|
|
when(cmsValidator.validate(eq(cms), eq(hashWithoutCms))).thenReturn(true); |
|
|
|
when(cmsValidator.validate(eq(cms), eq(hashWithoutCms))).thenReturn(true); |
|
|
|
|
|
|
|
|
|
|
|