most unit tests working, down to only 159 failures
This commit is contained in:
parent
484143f7d0
commit
8d7ce89b2c
0
src/miner.cpp
Normal file → Executable file
0
src/miner.cpp
Normal file → Executable file
0
src/miner.h
Normal file → Executable file
0
src/miner.h
Normal file → Executable file
0
src/primitives/transaction.h
Normal file → Executable file
0
src/primitives/transaction.h
Normal file → Executable file
@ -120,8 +120,9 @@ UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGen
|
||||
UniValue blockHashes(UniValue::VARR);
|
||||
while (nHeight < nHeightEnd)
|
||||
{
|
||||
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript, true, strTxComment));
|
||||
if (!pblocktemplate.get())
|
||||
// std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript, true, strTxComment));
|
||||
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript, true));
|
||||
if (!pblocktemplate.get())
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
|
||||
CBlock *pblock = &pblocktemplate->block;
|
||||
{
|
||||
|
||||
7
src/script/interpreter.cpp
Normal file → Executable file
7
src/script/interpreter.cpp
Normal file → Executable file
@ -1137,6 +1137,9 @@ public:
|
||||
SerializeOutput(s, nOutput);
|
||||
// Serialize nLockTime
|
||||
::Serialize(s, txTo.nLockTime);
|
||||
// Serialize strTxComment
|
||||
if (txTo.nVersion >= 2)
|
||||
::Serialize(s, txTo.strTxComment);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1214,9 +1217,13 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig
|
||||
ss << hashOutputs;
|
||||
// Locktime
|
||||
ss << txTo.nLockTime;
|
||||
// TX Comment
|
||||
if (txTo.nVersion >= 2)
|
||||
ss << txTo.strTxComment;
|
||||
// Sighash type
|
||||
ss << nHashType;
|
||||
|
||||
|
||||
return ss.GetHash();
|
||||
}
|
||||
|
||||
|
||||
1006
src/test/data/sighash.json
Normal file → Executable file
1006
src/test/data/sighash.json
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,9 @@
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
//uncomment this line to
|
||||
//#define PRINT_SIGHASH_JSON
|
||||
|
||||
extern UniValue read_json(const std::string& jsondata);
|
||||
|
||||
// Old script.cpp SignatureHash function
|
||||
|
||||
@ -1197,9 +1197,9 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight)
|
||||
}
|
||||
|
||||
bool CScriptCheck::operator()() {
|
||||
if (chainActive.Height() < 2000000) {
|
||||
return true; // ToDo: bitspill
|
||||
}
|
||||
// if (chainActive.Height() < 2000000) {
|
||||
// return true; // ToDo: bitspill
|
||||
// }
|
||||
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
|
||||
const CScriptWitness *witness = &ptxTo->vin[nIn].scriptWitness;
|
||||
return VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user