Sync: Sanity check msg siggy type
This commit is contained in:
parent
e68c8cb1ee
commit
31666b9617
@ -530,6 +530,12 @@ func (filec *FilecoinEC) checkBlockMessages(ctx context.Context, b *types.FullBl
|
|||||||
|
|
||||||
smArr := blockadt.MakeEmptyArray(tmpstore)
|
smArr := blockadt.MakeEmptyArray(tmpstore)
|
||||||
for i, m := range b.SecpkMessages {
|
for i, m := range b.SecpkMessages {
|
||||||
|
if filec.sm.GetNtwkVersion(ctx, b.Header.Height) >= network.Version14 {
|
||||||
|
if m.Signature.Type != crypto.SigTypeSecp256k1 {
|
||||||
|
return xerrors.Errorf("block had invalid secpk message at index %d: %w", i, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err := checkMsg(m); err != nil {
|
if err := checkMsg(m); err != nil {
|
||||||
return xerrors.Errorf("block had invalid secpk message at index %d: %w", i, err)
|
return xerrors.Errorf("block had invalid secpk message at index %d: %w", i, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user