Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

make blockservice AddBlocks return more quickly #10

Merged
merged 1 commit into from
May 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions blockservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ func (s *blockService) AddBlocks(bs []blocks.Block) error {
toput = bs
}

if len(toput) == 0 {
return nil
}

err := s.blockstore.PutMany(toput)
if err != nil {
return err
Expand Down