explicitly check miner address protocol
This is implicitly checked when verifying the miner signature, but explicitly checking it here makes it clear that this is a protocol requirement, and reduces the chances that it will be accidentally "refactored out".
This commit is contained in:
parent
d6c06881ee
commit
7c9b9e3657
@ -676,6 +676,10 @@ func blockSanityChecks(h *types.BlockHeader) error {
|
||||
return xerrors.Errorf("block had nil bls aggregate signature")
|
||||
}
|
||||
|
||||
if h.Miner.Protocol() != address.ID {
|
||||
return xerrors.Errorf("block had non-ID miner address")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user