txnouttype
, but after 4e91820531889e309dc4335fe0de8229c6426040 we switch
on the type.
txnouttype
, but after 4e91820531889e309dc4335fe0de8229c6426040 we switch
on the type.
113@@ -114,6 +114,7 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::v
114 vSolutionsRet.push_back(std::move(witnessprogram));
115 return true;
116 }
117+ typeRet = TX_NONSTANDARD;
vSolutionsRet
is also cleared/initialized. It also prevents the same problem if in the future early failure returns are added.
Could also drop lines 154 & 155 if you move this up.
That would just make it more fragile. As I understand this function signature, it is meant to return a “pair” of typeRet
and vSolutionsRet
. Setting that pair should happen as close to the return statement as possible (regardless of early-return or not).
IMO this could be in line 86 above where vSolutionsRet is also cleared/initialized. It also prevents the same problem if in the future early failure returns are added.
This will silence valgrind
and thus hide the same problem in the future instead of preventing it.
vSolutionsRet.clear();
in this line, if people prefer…
utACK fa36aa7 modulo @promag:s suggestion – putting it above is more robust.
How was this issue found?
Would running the test suite under valgrind
have catched this, or was this condition simply not covered by tests?
MarcoFalke
promag
Empact
sipa
practicalswift
Labels
Wallet