Skip to content

Commit

Permalink
Fix issue with message-forwarder tests (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamfraser authored Jul 31, 2024
1 parent 56364db commit 740c181
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ describe('message-forwarder', () => {
connectionId = msg.connection_id;
}
if (msg.message_id === 1) {
// Check that the initial message is correct.
// Check that the initial message is a Subscribe Message
checkInitialMessage(
msg as SubscribedMessage,
connectionId,
Expand Down
12 changes: 12 additions & 0 deletions indexer/services/socks/src/helpers/from-kafka-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ export function getMessageToForward(
version: subaccountMessage.version,
};
}
case Channel.V4_BLOCK_HEIGHT: {
const blockHeightMessage: BlockHeightMessage = BlockHeightMessage.decode(messageBinary);
return {
channel: Channel.V4_BLOCK_HEIGHT,
id: V4_BLOCK_HEIGHT_ID,
version: blockHeightMessage.version,
contents: {
blockHeight: blockHeightMessage.blockHeight,
time: blockHeightMessage.time,
},
};
}
default:
throw new InvalidForwardMessageError(`Unknown channel: ${channel}`);
}
Expand Down

0 comments on commit 740c181

Please sign in to comment.