Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Dec 8, 2023
1 parent 62b8f94 commit 28c4e1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/beacon-node/src/chain/blocks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export const getBlockInput = {
});
}

this.blockInputCache.set(blockHex, blockCache);
if (!this.blockInputCache.has(blockHex)) {
this.blockInputCache.set(blockHex, blockCache);
}
const {block: signedBlock, blockBytes, blobsCache, availabilityPromise, resolveAvailability} = blockCache;

if (signedBlock !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ async function maybeValidateBlobs(
}
}

/**
* Wait for blobs to become available with a cutoff time. If fails then throw DATA_UNAVAILABLE error
* which may try unknownblock/blobs fill (by root).
*/
async function raceWithCutoff<T>(
chain: {config: ChainForkConfig; genesisTime: UintNum64},
blockInput: BlockInput,
Expand Down

0 comments on commit 28c4e1f

Please sign in to comment.