[fixup] Fix remaining mismatched method signatures for forkid

This commit is contained in:
Jon Layton 2018-10-17 01:08:39 -05:00
parent 63b60917c0
commit 9f33304274
3 changed files with 6 additions and 6 deletions

View File

@ -50,7 +50,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state)
assert(rewound);
CValidationState validationState;
bool checked = CheckBlock(block, validationState, chainParams->GetConsensus());
bool checked = CheckBlock(block, validationState, *chainParams);
assert(checked);
}
}

View File

@ -57,7 +57,7 @@ bool PaymentDisclosureDB::Put(const PaymentDisclosureKey& key, const PaymentDisc
std::lock_guard<std::mutex> guard(lock_);
CDataStream ssValue(SER_DISK, CLIENT_VERSION);
ssValue.reserve(GetSerializeSize(info, SER_DISK, CLIENT_VERSION));
ssValue.reserve(GetSerializeSize(ssValue, CLIENT_VERSION));
ssValue << info;
leveldb::Slice slice(&ssValue[0], ssValue.size());

View File

@ -305,12 +305,12 @@ private:
public:
SignatureExtractorChecker(SignatureData& sigdata, BaseSignatureChecker& checker) : sigdata(sigdata), checker(checker) {}
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const override;
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, const int forkid, SigVersion sigversion) const override;
};
bool SignatureExtractorChecker::CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const
bool SignatureExtractorChecker::CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, const int forkid, SigVersion sigversion) const
{
if (checker.CheckSig(scriptSig, vchPubKey, scriptCode, sigversion)) {
if (checker.CheckSig(scriptSig, vchPubKey, scriptCode, forkid, sigversion)) {
CPubKey pubkey(vchPubKey);
sigdata.signatures.emplace(pubkey.GetID(), SigPair(pubkey, scriptSig));
return true;
@ -388,7 +388,7 @@ SignatureData DataFromTransaction(const CMutableTransaction& tx, unsigned int nI
for (unsigned int i = last_success_key; i < num_pubkeys; ++i) {
const valtype& pubkey = solutions[i+1];
// We either have a signature for this pubkey, or we have found a signature and it is valid
if (data.signatures.count(CPubKey(pubkey).GetID()) || extractor_checker.CheckSig(sig, pubkey, next_script, sigversion)) {
if (data.signatures.count(CPubKey(pubkey).GetID()) || extractor_checker.CheckSig(sig, pubkey, next_script, FORKID_IN_USE, sigversion)) {
last_success_key = i + 1;
break;
}