mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
f3ce5f8a36
Added initial proof generation tests for polygon reverse flow for devnet Blocks tested, receipts need trie proof clarification
20 lines
413 B
Go
20 lines
413 B
Go
package blocks
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/ledgerwatch/erigon/cmd/devnet/devnet"
|
|
"github.com/ledgerwatch/erigon/rpc"
|
|
)
|
|
|
|
func BaseFeeFromBlock(ctx context.Context) (uint64, error) {
|
|
res, err := devnet.SelectNode(ctx).GetBlockByNumber(ctx, rpc.LatestBlockNumber, false)
|
|
|
|
if err != nil {
|
|
return 0, fmt.Errorf("failed to get base fee from block: %v\n", err)
|
|
}
|
|
|
|
return res.BaseFee.Uint64(), err
|
|
}
|