Make Rust compilation mandatory

The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
This commit is contained in:
Jack Grigg
2018-03-28 17:55:45 +02:00
parent a08ad2b815
commit d9cd254e5e
4 changed files with 6 additions and 43 deletions

View File

@@ -16,9 +16,7 @@
#include "sodium.h"
#ifdef ENABLE_RUST
#include "librustzcash.h"
#endif // ENABLE_RUST
unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params& params)
{
@@ -100,13 +98,11 @@ bool CheckEquihashSolution(const CBlockHeader *pblock, const CChainParams& param
// H(I||V||...
crypto_generichash_blake2b_update(&state, (unsigned char*)&ss[0], ss.size());
#ifdef ENABLE_RUST
// Ensure that our Rust interactions are working in production builds. This is
// temporary and should be removed.
{
assert(librustzcash_xor(0x0f0f0f0f0f0f0f0f, 0x1111111111111111) == 0x1e1e1e1e1e1e1e1e);
}
#endif // ENABLE_RUST
bool isValid;
EhIsValidSolution(n, k, state, pblock->nSolution, isValid);