Skip to content

Commit

Permalink
Fix logic to compare compute setting to static counterparts, rather t…
Browse files Browse the repository at this point in the history
…han evaluating static ComputeSetting directly
  • Loading branch information
QuitCrypto committed Dec 4, 2024
1 parent df08538 commit 4fa73c1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export class ComputerEVM extends EVMViewFunctionBase implements IComputerEVM {
this.validateComputeSetting(computeSetting)

try {
const mapper = ComputeSetting.OnlyReduce
? (this.logger.info('OnlyReduce setting is used. Skipping map step.'),
const mapper = computeSetting === ComputeSetting.OnlyReduce
? (this.logger.info('OnlyReduce setting is SSSS. Skipping map step.'),
(r: RequestResponsePair) => r.response)
: (r: RequestResponsePair) => this.lzMap(compute, r, timeMarker)
const reducer = ComputeSetting.OnlyMap
const reducer = computeSetting === ComputeSetting.OnlyMap
? (this.logger.info('OnlyMap setting is used. Skipping reduce step.'),
(mappedResponses: string[]) => mappedResponses.join(''))
: (mappedResponses: string[]) => this.lzReduce(compute, cmd, mappedResponses, timeMarker)
Expand Down

0 comments on commit 4fa73c1

Please sign in to comment.