Skip to content

Commit

Permalink
lifecycle: re-register worker when operator mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
krhougs committed Oct 25, 2021
1 parent 625cbfb commit 4791b7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lifecycle/pruntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ export const registerWorker = async (runtime) => {
shouldRegister =
shouldRegister ||
!(workerInfo.initialScore.toJSON() > 50) ||
!(workerInfo.operator.toString() === pool.isProxy
? pool.realPhalaSs58
: pool.ss58Phala)
!(
workerInfo.operator.toString() ===
(pool.isProxy ? pool.realPhalaSs58 : pool.ss58Phala)
)

if (shouldRegister) {
await triggerRa(runtime)
Expand Down

0 comments on commit 4791b7b

Please sign in to comment.