| 234 | |
| 235 | template <typename F> |
| 236 | static bool CheckTransactionSignatureEncodingImpl(const valtype &vchSig, |
| 237 | uint32_t flags, |
| 238 | ScriptError *serror, F fun) { |
| 239 | // Empty signature. Not strictly DER encoded, but allowed to provide a |
| 240 | // compact way to provide an invalid signature for use with CHECK(MULTI)SIG |
| 241 | if (vchSig.size() == 0) { |
| 242 | return true; |
| 243 | } |
| 244 | |
| 245 | if (!fun(vchSig | boost::adaptors::sliced(0, vchSig.size() - 1), flags, |
| 246 | serror)) { |
| 247 | // serror is set |
| 248 | return false; |
| 249 | } |
| 250 | |
| 251 | return CheckSighashEncoding(vchSig, flags, serror); |
| 252 | } |
| 253 | |
| 254 | bool CheckTransactionSignatureEncoding(const valtype &vchSig, uint32_t flags, |
| 255 | ScriptError *serror) { |
no test coverage detected