Skip to content

Commit

Permalink
blockchain: don't flush index on ProcessBlockHeader
Browse files Browse the repository at this point in the history
To avoid additional code dealing with starting from a point where we
already have some headers, don't flush the index after just verifying
one header. This also has the side-effect of making the process bit
faster since there's no disk i/o happening now.
  • Loading branch information
kcalvinalvin committed Feb 1, 2024
1 parent ae34c4c commit f7d5a80
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions blockchain/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ func (b *BlockChain) ProcessBlockHeader(header *wire.BlockHeader) error {
if err != nil {
return err
}
err = b.index.flushToDB()
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit f7d5a80

Please sign in to comment.