use of org.adridadou.ethereum.propeller.event.BlockInfo in project eth-propeller-ethj by adridadou.
the class EthJEventListener method onBlock.
@Override
public void onBlock(Block block, List<TransactionReceipt> receipts) {
EthHash blockHash = EthHash.of(block.getHash());
eventHandler.onBlock(new BlockInfo(block.getNumber(), receipts.stream().map(receipt -> EthJEventListener.toReceipt(receipt, blockHash)).collect(Collectors.toList())));
receipts.forEach(receipt -> eventHandler.onTransactionExecuted(new TransactionInfo(EthHash.of(receipt.getTransaction().getHash()), toReceipt(receipt, blockHash), TransactionStatus.Executed, EthHash.empty())));
}
Aggregations