Remove unused sprout test code that uses libsodium functions that we no longer use
This commit is contained in:
@@ -166,48 +166,6 @@ void static RandomTransaction(CMutableTransaction &tx, bool fSingle, uint32_t co
|
||||
tx.vShieldedOutput.push_back(odesc);
|
||||
}
|
||||
}
|
||||
if (tx.nVersion >= 2) {
|
||||
for (int js = 0; js < joinsplits; js++) {
|
||||
JSDescription jsdesc;
|
||||
if (insecure_rand() % 2 == 0) {
|
||||
jsdesc.vpub_old = insecure_rand() % 100000000;
|
||||
} else {
|
||||
jsdesc.vpub_new = insecure_rand() % 100000000;
|
||||
}
|
||||
|
||||
jsdesc.anchor = GetRandHash();
|
||||
jsdesc.nullifiers[0] = GetRandHash();
|
||||
jsdesc.nullifiers[1] = GetRandHash();
|
||||
jsdesc.ephemeralKey = GetRandHash();
|
||||
jsdesc.randomSeed = GetRandHash();
|
||||
randombytes_buf(jsdesc.ciphertexts[0].begin(), jsdesc.ciphertexts[0].size());
|
||||
randombytes_buf(jsdesc.ciphertexts[1].begin(), jsdesc.ciphertexts[1].size());
|
||||
if (tx.fOverwintered && tx.nVersion >= SAPLING_TX_VERSION) {
|
||||
libzcash::GrothProof zkproof;
|
||||
randombytes_buf(zkproof.begin(), zkproof.size());
|
||||
jsdesc.proof = zkproof;
|
||||
} else {
|
||||
jsdesc.proof = libzcash::PHGRProof::random_invalid();
|
||||
}
|
||||
jsdesc.macs[0] = GetRandHash();
|
||||
jsdesc.macs[1] = GetRandHash();
|
||||
|
||||
tx.vjoinsplit.push_back(jsdesc);
|
||||
}
|
||||
|
||||
unsigned char joinSplitPrivKey[crypto_sign_SECRETKEYBYTES];
|
||||
crypto_sign_keypair(tx.joinSplitPubKey.begin(), joinSplitPrivKey);
|
||||
|
||||
// Empty output script.
|
||||
CScript scriptCode;
|
||||
CTransaction signTx(tx);
|
||||
uint256 dataToBeSigned = SignatureHash(scriptCode, signTx, NOT_AN_INPUT, SIGHASH_ALL, 0, consensusBranchId);
|
||||
|
||||
assert(crypto_sign_detached(&tx.joinSplitSig[0], NULL,
|
||||
dataToBeSigned.begin(), 32,
|
||||
joinSplitPrivKey
|
||||
) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(sighash_tests, JoinSplitTestingSetup)
|
||||
|
||||
Reference in New Issue
Block a user