Unverified Commit 564db9a9 authored by Felix Lange's avatar Felix Lange Committed by GitHub

core: add Timestamp method in BlockGen (#26844)

Since forks are now scheduled by block time, it can be necessary
to check the timestamp of a block while generating transactions.
parent 051493d9
......@@ -156,6 +156,11 @@ func (b *BlockGen) Number() *big.Int {
return new(big.Int).Set(b.header.Number)
}
// Timestamp returns the timestamp of the block being generated.
func (b *BlockGen) Timestamp() uint64 {
return b.header.Time
}
// BaseFee returns the EIP-1559 base fee of the block being generated.
func (b *BlockGen) BaseFee() *big.Int {
return new(big.Int).Set(b.header.BaseFee)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment