Skip to content

Commit

Permalink
Remove verifySignature from UT for the time being
Browse files Browse the repository at this point in the history
  • Loading branch information
isoosiss7 committed Apr 25, 2021
1 parent d183f8d commit 986d1b9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/native-utils/tests/sign.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,6 @@ describe('Sign state', () => {

expect(nativeSigned.signature).toStrictEqual(oldSignature)
expect(wasmSigned.signature).toStrictEqual(oldSignature)

// State hash can be verified by signature
expect(native.verifySignature(nativeSigned.hash, state.channel.participants[0], nativeSigned.signature)).toBe(true)
expect(native.verifySignature(wasmSigned.hash, state.channel.participants[0], wasmSigned.signature)).toBe(true)
expect(nativeSigned.hash).toStrictEqual(wasmSigned.hash)

// Old state cannot be verified by new signature
// New state cannto be vierified by old signature
state.turnNum += 1
const signedNewState = native.signState(state, PRIVATE_KEY1)
expect(native.verifySignature(nativeSigned.hash, state.channel.participants[0], signedNewState.signature)).toBe(false)
expect(native.verifySignature(signedNewState.hash, state.channel.participants[0], nativeSigned.signature)).toBe(false)
expect(native.verifySignature(signedNewState.hash, state.channel.participants[0], signedNewState.signature)).toBe(true)
})

test('Peer states validate as expected', async () => {
Expand Down

0 comments on commit 986d1b9

Please sign in to comment.