| 1004 | const BaseSignatureCreator& DUMMY_MAXIMUM_SIGNATURE_CREATOR = DummySignatureCreator(33, 32); |
| 1005 | |
| 1006 | bool IsSegWitOutput(const SigningProvider& provider, const CScript& script) |
| 1007 | { |
| 1008 | int version; |
| 1009 | valtype program; |
| 1010 | if (script.IsWitnessProgram(version, program)) return true; |
| 1011 | if (script.IsPayToScriptHash()) { |
| 1012 | std::vector<valtype> solutions; |
| 1013 | auto whichtype = Solver(script, solutions); |
| 1014 | if (whichtype == TxoutType::SCRIPTHASH) { |
| 1015 | auto h160 = uint160(solutions[0]); |
| 1016 | CScript subscript; |
| 1017 | if (provider.GetCScript(CScriptID{h160}, subscript)) { |
| 1018 | if (subscript.IsWitnessProgram(version, program)) return true; |
| 1019 | } |
| 1020 | } |
| 1021 | } |
| 1022 | return false; |
| 1023 | } |
| 1024 | |
| 1025 | bool SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore, const std::map<COutPoint, Coin>& coins, const SignOptions& options, std::map<int, bilingual_str>& input_errors) |
| 1026 | { |
no test coverage detected