| 406 | } |
| 407 | |
| 408 | std::optional<int64_t> ParseScriptNumber(const Opcode& in) { |
| 409 | if (in.first == OP_0) { |
| 410 | return 0; |
| 411 | } |
| 412 | if (!in.second.empty()) { |
| 413 | if (IsPushdataOp(in.first) && !CheckMinimalPush(in.second, in.first)) return {}; |
| 414 | try { |
| 415 | return CScriptNum(in.second, true).GetInt64(); |
| 416 | } catch(const scriptnum_error&) {} |
| 417 | } |
| 418 | return {}; |
| 419 | } |
| 420 | |
| 421 | int FindNextChar(std::span<const char> sp, const char m) |
| 422 | { |
no test coverage detected