| 310 | } |
| 311 | |
| 312 | void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore, const std::map<COutPoint, Coin>& coins, const UniValue& hashType, UniValue& result) |
| 313 | { |
| 314 | std::optional<int> nHashType = ParseSighashString(hashType); |
| 315 | if (!nHashType) { |
| 316 | nHashType = SIGHASH_DEFAULT; |
| 317 | } |
| 318 | |
| 319 | // Script verification errors |
| 320 | std::map<int, bilingual_str> input_errors; |
| 321 | |
| 322 | bool complete = SignTransaction(mtx, keystore, coins, {.sighash_type = *nHashType}, input_errors); |
| 323 | SignTransactionResultToJSON(mtx, complete, coins, input_errors, result); |
| 324 | } |
| 325 | |
| 326 | void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, const std::map<int, bilingual_str>& input_errors, UniValue& result) |
| 327 | { |
no test coverage detected