refactor: make use of ctx.BlockHeader().ProposerAddress to ensure correct Proposer

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
Lorenz Herzberger 2024-10-23 12:57:28 +02:00
parent f1e029eaf9
commit 4bfe586e93
No known key found for this signature in database
GPG Key ID: FA5EE906EB55316A

View File

@ -12,7 +12,7 @@ import (
) )
func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) {
proposerAddress := req.Header.GetProposerAddress() proposerAddress := ctx.BlockHeader().ProposerAddress
// Check if node is block proposer // Check if node is block proposer
// take the following actions only once, that's why we filter for the Block Proposer // take the following actions only once, that's why we filter for the Block Proposer