mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
Update chain_makers.go (#81)
This commit is contained in:
parent
118eb75ed3
commit
97a81753b8
1 changed files with 14 additions and 1 deletions
|
|
@ -104,8 +104,21 @@ func (b *BlockGen) SetParentBeaconRoot(root common.Hash) {
|
||||||
|
|
||||||
// SetParentProposerPubkey sets the parent proposer pubkey field of the generated
|
// SetParentProposerPubkey sets the parent proposer pubkey field of the generated
|
||||||
// block.
|
// block.
|
||||||
func (b *BlockGen) SetParentProposerPubkey(pubkey common.Pubkey) {
|
func (b *BlockGen) SetParentProposerPubkey(pubkey common.Pubkey) error {
|
||||||
b.header.ParentProposerPubkey = &pubkey
|
b.header.ParentProposerPubkey = &pubkey
|
||||||
|
tx, err := types.NewPoLTx(
|
||||||
|
b.cm.config.ChainID,
|
||||||
|
b.cm.config.Berachain.Prague1.PoLDistributorAddress,
|
||||||
|
b.header.Number,
|
||||||
|
params.PoLTxGasLimit,
|
||||||
|
b.header.BaseFee,
|
||||||
|
b.header.ParentProposerPubkey,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
b.AddTx(tx)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// addTx adds a transaction to the generated block. If no coinbase has
|
// addTx adds a transaction to the generated block. If no coinbase has
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue