[Chronik] Change empp::parse to return None for ignorable results
Summary:
Currently, ParseError::should_ignore tells the call site whether to ignore the failed parsing attempt.
However, it is more intuitive to return Ok(None) in this case.
Also, we change the semantics slightly to make the parsing error a bit more precise:
- If the script has invalidly encoded opcodes (e.g. OP_PUSHDATA1 with a missing length), but doesn't start with OP_RETURN OP_RESERVED, we return None
- If the script does start with OP_RETURN OP_RESERVED, we return the DataError associated with the failed parse from the opcode.
This means users get an error for the bad script (which would fail policy rules anyway) a bit earlier, if it does look like they tried to use eMPP.
Test Plan: cargo test -p bitcoinsuite-slp
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Subscribers: bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D15016