From a5ee1d8d1a66a9878e50983ba77c8f2ab3ee3210 Mon Sep 17 00:00:00 2001 From: Kerry Washington Date: Sat, 25 Nov 2023 09:59:14 -0500 Subject: [PATCH] Simple cruft removal (#36) - Not very critical as it is a test file. Signed-off-by: kcw-grunt --- test.c | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/test.c b/test.c index 7b212edb8..9fea830d4 100644 --- a/test.c +++ b/test.c @@ -60,11 +60,7 @@ #define _va_rest(first, ...) __VA_ARGS__ #endif -<<<<<<< HEAD #if LITECOIN_TESTNET -======= -#if BITCOIN_TESTNET ->>>>>>> origin/main #define BR_CHAIN_PARAMS BRTestNetParams #else #define BR_CHAIN_PARAMS BRMainNetParams @@ -170,13 +166,6 @@ int BRArrayTests() return r; } -//inline static int compare_int(void *info, const void *a, const void *b) -//{ -// if (*(int *)a < *(int *)b) return -1; -// if (*(int *)a > *(int *)b) return 1; -// return 0; -//} - inline static size_t hash_int(const void *i) { return (size_t)((0x811C9dc5 ^ *(const unsigned *)i)*0x01000193); // (FNV_OFFSET xor i)*FNV_PRIME @@ -332,20 +321,10 @@ int BRBech32Tests() char h[84]; char *s, addr[91]; size_t l; -<<<<<<< HEAD - -======= - ->>>>>>> origin/main s = "\x00\x14\x75\x1e\x76\xe8\x19\x91\x96\xd4\x54\x94\x1c\x45\xd1\xb3\xa3\x23\xf1\x43\x3b\xd6"; l = BRBech32Decode(h, b, "BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4"); if (l != 22 || strcmp(h, "bc") || memcmp(s, b, l)) r = 0, fprintf(stderr, "\n***FAILED*** %s: BRBech32Decode() test 1", __func__); -<<<<<<< HEAD - -======= - ->>>>>>> origin/main l = BRBech32Decode(h, b, "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"); if (l != 22 || strcmp(h, "bc") || memcmp(s, b, l)) r = 0, fprintf(stderr, "\n***FAILED*** %s: BRBech32Decode() test 2", __func__); @@ -1635,26 +1614,13 @@ int BRBIP32SequenceTests() "banner amused fringe fox insect roast aunt prefer hollow basic ladder", NULL); BRBIP32BitIDKey(&key, dk.u8, sizeof(dk), 0, "http://bitid.bitcoin.blue/callback"); BRKeyAddress(&key, addr.s, sizeof(addr)); -<<<<<<< HEAD #if LITECOIN_TESTNET -======= -#if BITCOIN_TESTNET ->>>>>>> origin/main if (strncmp(addr.s, "mxZ2Dn9vcyNeKh9DNHZw6d6NrxeYCVNjc2", sizeof(addr)) != 0) r = 0, fprintf(stderr, "***FAILED*** %s: BRBIP32BitIDKey() test\n", __func__); #else if (strncmp(addr.s, "1J34vj4wowwPYafbeibZGht3zy3qERoUM1", sizeof(addr)) != 0) r = 0, fprintf(stderr, "***FAILED*** %s: BRBIP32BitIDKey() test\n", __func__); #endif -<<<<<<< HEAD - -======= - ->>>>>>> origin/main - // TODO: XXX test BRBIP32SerializeMasterPrivKey() - // TODO: XXX test BRBIP32SerializeMasterPubKey() - - printf(" "); return r; } @@ -1825,7 +1791,6 @@ int BRTransactionTests() BRTransactionFree(tgt); BRTransactionFree(src); -<<<<<<< HEAD BRTransaction *src = BRTransactionNew (); BRTransactionAddInput(src, inHash, 0, 1, script, scriptLen, NULL, 0, TXIN_SEQUENCE); BRTransactionAddInput(src, inHash, 0, 1, script, scriptLen, NULL, 0, TXIN_SEQUENCE); @@ -1851,8 +1816,6 @@ int BRTransactionTests() BRTransactionFree(tgt); BRTransactionFree(src); -======= ->>>>>>> origin/main if (! r) fprintf(stderr, "\n "); return r; } @@ -2193,16 +2156,6 @@ int BRMerkleBlockTests() if (! UInt256Eq(txHashes[3], uint256("c9ab658448c10b6921b7a4ce3021eb22ed6bb6a7fde1e5bcc4b1db6615c6abc5"))) r = 0, fprintf(stderr, "***FAILED*** %s: BRMerkleBlockTxHashes() test 4\n", __func__); - // TODO: test a block with an odd number of tree rows both at the tx level and merkle node level - - // TODO: XXX test BRMerkleBlockVerifyDifficulty() - - // TODO: test (CVE-2012-2459) vulnerability -<<<<<<< HEAD - -======= - ->>>>>>> origin/main BRMerkleBlock *c = BRMerkleBlockCopy(b); if (!BRMerkleBlockEqual(b, c)) @@ -2584,11 +2537,7 @@ int BRPaymentProtocolEncryptionTests() BRKeySetSecret(&senderKey, &uint256("0000000000000000000000000000000000000000000000000000000000000001"), 1); BRKeySetSecret(&receiverKey, &uint256("0000000000000000000000000000000000000000000000000000000000000002"), 1); -<<<<<<< HEAD -======= - ->>>>>>> origin/main BRPaymentProtocolInvoiceRequest *req = BRPaymentProtocolInvoiceRequestNew(&senderKey, 0, NULL, NULL, 0, NULL, NULL, NULL, 0);