mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 00:09:31 +01:00
BlockFileLoader: stream()
call streamBuffers()
`stream()` is `streamBuffers()` with a `map()` operation to read a buffer into a Block. Make this more clear by removing duplicated code.
This commit is contained in:
parent
712d8aac10
commit
d347ef996e
1 changed files with 1 additions and 2 deletions
|
@ -204,8 +204,7 @@ public class BlockFileLoader implements Iterable<Block> {
|
|||
}
|
||||
|
||||
public Stream<Block> stream() {
|
||||
return files.stream()
|
||||
.flatMap(this::fileBlockStream)
|
||||
return streamBuffers()
|
||||
.map(serializer::makeBlock);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue