Chore:Resolved java Util NoSuchElementException (#7730)

* Chore:Resolved java Util NoSuchElementException

Signed-off-by: Preeti <35308865+pr9t@users.noreply.github.com>

* formatting

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Preeti <35308865+pr9t@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
Preeti
2024-10-11 04:44:34 +05:30
committed by GitHub
parent aac7c63b08
commit e723b622c8

View File

@@ -95,7 +95,8 @@ public class EthGetBlockReceipts extends AbstractBlockParameterOrBlockHashMethod
.map(
block ->
block.getTransactions().stream()
.map(tx -> txReceipt(tx).get())
.map(this::txReceipt)
.flatMap(Optional::stream)
.collect(Collectors.toList()))
.orElse(new ArrayList<>());