mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core/txpool/blobpool: remove todo
This commit is contained in:
parent
a4ed392269
commit
589f80ca56
1 changed files with 4 additions and 2 deletions
|
|
@ -91,11 +91,13 @@ func NewBlobBuffer(cb BlobBufferFunctions) *BlobBuffer {
|
|||
// Flush adds all completed entries to the pool and returns the hashes
|
||||
// and corresponding errors (nil on success) for each attempted insert.
|
||||
func (b *BlobBuffer) Flush() ([]common.Hash, []error) {
|
||||
// Read the count first and return early
|
||||
// todo: increase threshold ?
|
||||
// Read the count first and return early if there is nothing to do.
|
||||
// Flush is called very frequently from the blob fetcher so this
|
||||
// optimization is warranted.
|
||||
if b.completedCount.Load() == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue