Merge branch 'beta' into mergemaster
# Conflicts: # src/main.cpp
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
|
||||
#include "zcashconsensus.h"
|
||||
|
||||
#include "consensus/upgrades.h"
|
||||
#include "primitives/transaction.h"
|
||||
#include "pubkey.h"
|
||||
#include "script/interpreter.h"
|
||||
#include "version.h"
|
||||
|
||||
@@ -60,7 +62,13 @@ inline int set_error(zcashconsensus_error* ret, zcashconsensus_error serror)
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // anon namespace
|
||||
struct ECCryptoClosure
|
||||
{
|
||||
ECCVerifyHandle handle;
|
||||
};
|
||||
|
||||
ECCryptoClosure instance_of_eccryptoclosure;
|
||||
}
|
||||
|
||||
int zcashconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
|
||||
const unsigned char *txTo , unsigned int txToLen,
|
||||
@@ -77,8 +85,16 @@ int zcashconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int
|
||||
|
||||
// Regardless of the verification result, the tx did not error.
|
||||
set_error(err, zcashconsensus_ERR_OK);
|
||||
|
||||
return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn), NULL);
|
||||
PrecomputedTransactionData txdata(tx);
|
||||
CAmount am(0);
|
||||
uint32_t consensusBranchId = SPROUT_BRANCH_ID;
|
||||
return VerifyScript(
|
||||
tx.vin[nIn].scriptSig,
|
||||
CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen),
|
||||
flags,
|
||||
TransactionSignatureChecker(&tx, nIn, am, txdata),
|
||||
consensusBranchId,
|
||||
NULL);
|
||||
} catch (const std::exception&) {
|
||||
return set_error(err, zcashconsensus_ERR_TX_DESERIALIZE); // Error deserializing
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user