Fix cross link verification

pull/1348/head
Rongjian Lan 5 years ago
parent d55cf7a810
commit 907c4a75a5
  1. 4
      node/node_cross_shard.go

@ -97,8 +97,8 @@ func (node *Node) VerifyCrosslinkHeader(prevHeader, header *types.Header) error
}
// Verify signature of the new cross link header
shardState, err := node.Blockchain().ReadShardState(header.Epoch)
committee := shardState.FindCommitteeByID(header.ShardID)
shardState, err := node.Blockchain().ReadShardState(prevHeader.Epoch)
committee := shardState.FindCommitteeByID(prevHeader.ShardID)
if err != nil || committee == nil {
return ctxerror.New("[CrossLink] Failed to read shard state for cross link header", "shardID", header.ShardID, "blockNum", header.Number).WithCause(err)

Loading…
Cancel
Save