We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebc7dc9 commit 7755ee3Copy full SHA for 7755ee3
consensus/misc/eip4844/eip4844.go
@@ -200,6 +200,15 @@ func LatestMaxBlobsPerBlock(cfg *params.ChainConfig) int {
200
return bcfg.Max
201
}
202
203
+// TargetBlobsPerBlock returns the target blobs per block for a block at the given timestamp.
204
+func TargetBlobsPerBlock(cfg *params.ChainConfig, time uint64) int {
205
+ blobConfig := latestBlobConfig(cfg, time)
206
+ if blobConfig == nil {
207
+ return 0
208
+ }
209
+ return blobConfig.Target
210
+}
211
+
212
// fakeExponential approximates factor * e ** (numerator / denominator) using
213
// Taylor expansion.
214
func fakeExponential(factor, numerator, denominator *big.Int) *big.Int {
0 commit comments