fix: update registered messages
This commit is contained in:
parent
35ebf74f4c
commit
87d1e6b0b4
|
@ -1,9 +1,24 @@
|
|||
import { P2PMessageHandler } from "#types.js";
|
||||
import handshakeOpen from "#messages/handshakeOpen.js";
|
||||
import {
|
||||
protocolMethodHandshakeOpen,
|
||||
protocolMethodRegistryQuery,
|
||||
protocolMethodSignedMessage,
|
||||
recordTypeRegistryEntry,
|
||||
recordTypeStorageLocation,
|
||||
} from "#constants.js";
|
||||
import registryQuery from "#messages/registryQuery.js";
|
||||
import registryEntry from "#messages/registryEntry.js";
|
||||
import storageLocation from "#messages/storageLocation.js";
|
||||
import signedMessage from "#messages/signedMessage.js";
|
||||
|
||||
const messages = new Map<number, P2PMessageHandler>(
|
||||
Object.entries({
|
||||
protocolMethodHandshakeOpen: handshakeOpen,
|
||||
[protocolMethodHandshakeOpen]: handshakeOpen,
|
||||
[protocolMethodRegistryQuery]: registryQuery,
|
||||
[recordTypeRegistryEntry]: registryEntry,
|
||||
[recordTypeStorageLocation]: storageLocation,
|
||||
[protocolMethodSignedMessage]: signedMessage,
|
||||
}).map(([key, value]) => [Number(key), value]),
|
||||
);
|
||||
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
import { P2PSignedMessageHandler } from "#types.js";
|
||||
import handshakeDone from "#messages/signedMessages/handshakeDone.js";
|
||||
import {
|
||||
protocolMethodAnnouncePeers,
|
||||
protocolMethodHandshakeDone,
|
||||
} from "#constants.js";
|
||||
import announcePeers from "#messages/signedMessages/announcePeers.js";
|
||||
|
||||
const messages = new Map<number, P2PSignedMessageHandler>(
|
||||
Object.entries({
|
||||
protocolMethodHandshakeOpen: handshakeDone,
|
||||
[protocolMethodHandshakeDone]: handshakeDone,
|
||||
[protocolMethodAnnouncePeers]: announcePeers,
|
||||
}).map(([key, value]) => [Number(key), value]),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue