Skip to content

Commit

Permalink
fix eval get multi up to 32 positions
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Mar 12, 2024
1 parent d241c96 commit f551a6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/evalCache/EvalCacheApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class EvalCacheApi(mongo: Mongo)(using
emit:
ClientIn.EvalHitMulti:
EvalCacheJsonHandlers.writeMultiHit(evals)
multi.register(sri, e.copy(fens = e.fens.take(32)))
multi.register(sri, e.copy(fens = e.fens))

def put(sri: Sri, user: User.Id, e: EvalPut): Unit =
truster
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/evalCache/EvalCacheJsonHandlers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object EvalCacheJsonHandlers:
def readGetMulti(d: JsObject) = for
fens <- d.get[List[Fen.Epd]]("fens")
variant = Variant.orDefault(d.get[Variant.LilaKey]("variant"))
yield ipc.ClientOut.EvalGetMulti(fens.take(9), variant)
yield ipc.ClientOut.EvalGetMulti(fens.take(32), variant)

def writeEval(e: Eval, fen: Fen.Epd) = Json.obj(
"fen" -> fen,
Expand Down

0 comments on commit f551a6e

Please sign in to comment.