Commit 841eaacf authored by refcell.eth's avatar refcell.eth Committed by GitHub

fix: Job Instantiation Encapsulation (#8751)

parent 454060fb
......@@ -143,7 +143,7 @@ func (c *coordinator) createJob(ctx context.Context, game types.GameMetadata, bl
c.logger.Debug("Not rescheduling resolved game", "game", game.Proxy, "status", state.status)
return nil, nil
}
return &job{block: blockNumber, addr: game.Proxy, player: state.player, status: state.status}, nil
return newJob(blockNumber, game.Proxy, state.player, state.status), nil
}
func (c *coordinator) enqueueJob(ctx context.Context, j job) error {
......
......@@ -25,3 +25,12 @@ type job struct {
player GamePlayer
status types.GameStatus
}
func newJob(block uint64, addr common.Address, player GamePlayer, status types.GameStatus) *job {
return &job{
block: block,
addr: addr,
player: player,
status: status,
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment