Skip to content

Commit

Permalink
Don't call getNextCommand data for each command
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihajlo-Pavlovic committed Dec 27, 2024
1 parent 48116f9 commit 622b54b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class ProtocolScheduleMessagesCommand extends Command {
currentBatchNodes.length
}, leftover for retry: ${currentBatchLeftoverNodes.length}`,
);
const nextCommandData = this.getNextCommandData(command);
console.log('NEXT COMMAND DATA:', JSON.stringify(nextCommandData, null, 2));

const addCommandPromises = currentBatchNodes.map(async (node) => {
const commandSequence = this.protocolService.getSenderCommandSequence(node.protocol);
Expand All @@ -48,7 +50,7 @@ class ProtocolScheduleMessagesCommand extends Command {
sequence: commandSequence.slice(1),
delay: 0,
data: {
...this.getNextCommandData(command),
...nextCommandData,
blockchain,
operationId,
node,
Expand Down

0 comments on commit 622b54b

Please sign in to comment.