forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 142
/
taiko_miner.go
41 lines (37 loc) 路 1.05 KB
/
taiko_miner.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package miner
import (
"math/big"
"github.com/ethereum/go-ethereum/beacon/engine"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
)
// SealBlockWith mines and seals a block without changing the canonical chain.
func (miner *Miner) SealBlockWith(
parent common.Hash,
timestamp uint64,
blkMeta *engine.BlockMetadata,
baseFeePerGas *big.Int,
withdrawals types.Withdrawals,
) (*types.Block, error) {
return miner.worker.sealBlockWith(parent, timestamp, blkMeta, baseFeePerGas, withdrawals)
}
// BuildTransactionsLists builds multiple transactions lists which satisfy all the given limits.
func (miner *Miner) BuildTransactionsLists(
beneficiary common.Address,
baseFee *big.Int,
maxTransactionsPerBlock uint64,
blockMaxGasLimit uint64,
maxBytesPerTxList uint64,
locals []string,
maxTransactionsLists uint64,
) ([]types.Transactions, error) {
return miner.worker.BuildTransactionsLists(
beneficiary,
baseFee,
maxTransactionsPerBlock,
blockMaxGasLimit,
maxBytesPerTxList,
locals,
maxTransactionsLists,
)
}