Skip to content

Commit

Permalink
chore: conform to style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Jan 12, 2024
1 parent 32b8328 commit a97905b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/beacon-node/src/util/bufferPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export class BufferPool {
* Grow the buffer if the requested size is larger than the current buffer.
*/
alloc(size: number): {buffer: Uint8Array; key: number} | null {
return this._alloc(size, false);
return this.doAlloc(size, false);
}

/**
* Same to alloc() but the buffer is not zeroed.
*/
allocUnsafe(size: number): {buffer: Uint8Array; key: number} | null {
return this._alloc(size, true);
return this.doAlloc(size, true);
}

_alloc(size: number, isUnsafe = false): {buffer: Uint8Array; key: number} | null {
private doAlloc(size: number, isUnsafe = false): {buffer: Uint8Array; key: number} | null {
if (this.inUse) {
this.metrics?.misses.inc();
return null;
Expand Down

0 comments on commit a97905b

Please sign in to comment.