chainwatch: don't crash with nil ticket
This commit is contained in:
parent
f86a2ced06
commit
c4d01c04a4
@ -653,6 +653,14 @@ create temp table b (like blocks excluding constraints) on commit drop;
|
||||
eprof = bh.ElectionProof.VRFProof
|
||||
}
|
||||
|
||||
if bh.Ticket == nil {
|
||||
log.Warnf("got a block with nil ticket")
|
||||
|
||||
bh.Ticket = &types.Ticket{
|
||||
VRFProof: []byte{},
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := stmt2.Exec(
|
||||
bh.Cid().String(),
|
||||
bh.ParentWeight.String(),
|
||||
|
Loading…
Reference in New Issue
Block a user