mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-22 07:21:44 +00:00
Add debug
This commit is contained in:
@ -56,21 +56,15 @@ describe("Noise", () => {
|
||||
wrappedOutbound.writeLP(Buffer.from("test"));
|
||||
const response = await wrappedInbound.readLP();
|
||||
expect(response.toString()).equal("test");
|
||||
})
|
||||
});
|
||||
|
||||
/*
|
||||
it("should test that secureOutbound is spec compliant", async(done) => {
|
||||
it("should test that secureOutbound is spec compliant", async() => {
|
||||
const libp2pKeys = await generateEd25519Keys();
|
||||
const libp2pKeys2 = await generateEd25519Keys();
|
||||
|
||||
const noiseInit = new Noise(libp2pKeys._key, localPeer.privKey.bytes);
|
||||
const noiseResp = new Noise(libp2pKeys2._key, remotePeer.privKey.bytes);
|
||||
|
||||
const [inboundConnection, outboundConnection] = DuplexPair();
|
||||
const [outbound, inbound] = await Promise.all([
|
||||
noiseInit.secureOutbound(localPeer, outboundConnection, remotePeer),
|
||||
noiseResp.secureInbound(remotePeer, inboundConnection, localPeer),
|
||||
|
||||
const [outbound] = await Promise.all([
|
||||
noiseInit.secureOutbound(localPeer, outboundConnection, remotePeer),
|
||||
(async () => {
|
||||
const wrapped = Wrap(inboundConnection);
|
||||
const prologue = Buffer.from('/noise');
|
||||
@ -90,5 +84,4 @@ describe("Noise", () => {
|
||||
})(),
|
||||
]);
|
||||
})
|
||||
*/
|
||||
});
|
||||
|
Reference in New Issue
Block a user