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

Commit 1332536

Browse files
committed
make blockservice AddBlocks return more quickly
1 parent fcf2054 commit 1332536

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: blockservice.go

+4
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ func (s *blockService) AddBlocks(bs []blocks.Block) error {
181181
toput = bs
182182
}
183183

184+
if len(toput) == 0 {
185+
return nil
186+
}
187+
184188
err := s.blockstore.PutMany(toput)
185189
if err != nil {
186190
return err

0 commit comments

Comments
 (0)