Update chain_makers.go (#81)

This commit is contained in:
Rez 2025-09-03 12:31:49 +10:00 committed by GitHub
parent 118eb75ed3
commit 97a81753b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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