use of org.hyperledger.besu.ethereum.core.NonBesuBlockHeader in project besu by hyperledger.
the class BftQueryServiceImplTest method getSignersThrowsIfBlockIsNotOnTheChain.
@Test
public void getSignersThrowsIfBlockIsNotOnTheChain() {
final NonBesuBlockHeader header = new NonBesuBlockHeader(Hash.EMPTY, Bytes.EMPTY);
final BftQueryService service = new BftQueryServiceImpl(bftBlockInterface, blockchain, validatorProvider, null, null);
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(() -> service.getSignersFrom(header));
}
use of org.hyperledger.besu.ethereum.core.NonBesuBlockHeader in project besu by hyperledger.
the class BftQueryServiceImplTest method getRoundNumberThrowsIfBlockIsNotOnTheChain.
@Test
public void getRoundNumberThrowsIfBlockIsNotOnTheChain() {
final NonBesuBlockHeader header = new NonBesuBlockHeader(Hash.EMPTY, Bytes.EMPTY);
final BftQueryService service = new BftQueryServiceImpl(new BftBlockInterface(bftExtraDataCodec), blockchain, validatorProvider, null, null);
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(() -> service.getRoundNumberFrom(header));
}
Aggregations