Skip to content

Commit

Permalink
Add guard when selecting lucky nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
thantsintoe authored and urnotsam committed Apr 19, 2024
1 parent 99c2153 commit c2e6864
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shardus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ class Shardus extends EventEmitter {
continue;
}
let node = nodes.get(id)
if (node.status !== 'active') continue
if (node.status !== 'active' || isNodeInRotationBounds(id)) continue
const validatorDetails = {
ip: node.externalIp,
port: node.externalPort,
Expand All @@ -1531,6 +1531,7 @@ class Shardus extends EventEmitter {
const result = await this.app.injectTxToConsensor(selectedValidators, tx);
return result
}
return { success: false, reason: 'No validators found to forward the transaction', status: 500 }
}

/**
Expand Down

0 comments on commit c2e6864

Please sign in to comment.