Better naming

This commit is contained in:
Belma Gutlic
2020-01-05 19:09:59 +01:00
parent 4a9b814e5a
commit 096a30b289
9 changed files with 23 additions and 24 deletions

View File

@ -13,7 +13,7 @@ import {
signPayload
} from "../src/utils";
import { decodeMessageBuffer, encodeMessageBuffer } from "../src/encoder";
import {XXHandshake} from "../src/handshakes/xx";
import {XX} from "../src/handshakes/xx";
import {Buffer} from "buffer";
import {getKeyPairFromPeerId} from "./utils";
@ -58,7 +58,7 @@ describe("Noise", () => {
const wrapped = Wrap(inboundConnection);
const prologue = Buffer.from('/noise');
const staticKeys = generateKeypair();
const xx = new XXHandshake();
const xx = new XX();
const { privateKey: libp2pPrivKey, publicKey: libp2pPubKey } = getKeyPairFromPeerId(remotePeer);
const handshake = new Handshake(false, libp2pPrivKey, libp2pPubKey, prologue, staticKeys, wrapped, localPeer, xx);