Add additional assertions.
This commit is contained in:
parent
e8af0028eb
commit
7c68cc0747
|
@ -33,6 +33,7 @@
|
|||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/math/distributions/poisson.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -992,6 +993,8 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
|
|||
REJECT_INVALID, "error-computing-signature-hash");
|
||||
}
|
||||
|
||||
BOOST_STATIC_ASSERT(crypto_sign_PUBLICKEYBYTES == 32);
|
||||
|
||||
if (crypto_sign_verify_detached(&tx.joinSplitSig[0],
|
||||
dataToBeSigned.begin(), 32,
|
||||
tx.joinSplitPubKey.begin()
|
||||
|
|
|
@ -82,7 +82,7 @@ uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, un
|
|||
}
|
||||
|
||||
// Blank out the joinsplit signature.
|
||||
memset(&txTmp.joinSplitSig[0], 0, 64);
|
||||
memset(&txTmp.joinSplitSig[0], 0, txTmp.joinSplitSig.size());
|
||||
|
||||
// Serialize and hash
|
||||
CHashWriter ss(SER_GETHASH, 0);
|
||||
|
|
Loading…
Reference in New Issue