mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +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
|
// Flush adds all completed entries to the pool and returns the hashes
|
||||||
// and corresponding errors (nil on success) for each attempted insert.
|
// and corresponding errors (nil on success) for each attempted insert.
|
||||||
func (b *BlobBuffer) Flush() ([]common.Hash, []error) {
|
func (b *BlobBuffer) Flush() ([]common.Hash, []error) {
|
||||||
// Read the count first and return early
|
// Read the count first and return early if there is nothing to do.
|
||||||
// todo: increase threshold ?
|
// Flush is called very frequently from the blob fetcher so this
|
||||||
|
// optimization is warranted.
|
||||||
if b.completedCount.Load() == 0 {
|
if b.completedCount.Load() == 0 {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
b.mu.Lock()
|
b.mu.Lock()
|
||||||
defer b.mu.Unlock()
|
defer b.mu.Unlock()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue