Merge pull request #3479 from Hedrauta/patch-1

MISC: HammingCodingContracts need rework
This commit is contained in:
hydroflame 2022-04-18 11:03:41 -04:00 committed by GitHub
commit 5d23926556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,7 @@
import { getRandomInt } from "../utils/helpers/getRandomInt";
import { MinHeap } from "../utils/Heap";
import { HammingEncode, HammingDecode } from "../utils/HammingCodeTools";
// import { HammingEncode, HammingDecode } from "../utils/HammingCodeTools";
/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */
/* Function that generates a valid 'data' for a contract type */
@ -1247,7 +1247,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
return true;
},
},
} /*
{
name: "HammingCodes: Integer to encoded Binary",
numTries: 10,
@ -1305,5 +1305,5 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
solver: (data: string, ans: string): boolean => {
return parseInt(ans, 10) === HammingDecode(data);
},
},
},*/,
];