This commit modifies the names of opcdoes shown in the oneline script
disassembly to match the reference implementation. In particular
OP_1NEGATE, and OP_0 through OP_16 are changed to the raw numbers
they represent when doing oneline disassembly. When doing full
disassembly, the full opcode names are still shown.
ok @owainga.
The allows the tests to run without showing warning for malformed bits
(which are intentionally malformed for testing purposes). Also, the
tests would not compile since the new btclog backend was switched out.
This commit resolves that.
This removes the bip16 bool from NewScript and adds it to flags (with
the constant ScriptBip16), and also adds a new flag,
ScriptCanonicalSignatures, which will call btcec.ParseDERSignature
parsing a signature during an Execute. This is needed to emulate
bitcoind behavior, as bitcoind performs canonical signature validation
(DER format) in some places (like mempool acceptance) but not others
(like block validation).
Updated tests and test coverage file to reflect changes.
So add entries for them that disassemble and parse ok, but will fail
when executed with the appropriate error. Add a full suite of tests to confirm
that this happens.
Found by a strange transaction in testnet.
This commit modifies the code to no longer require a protocol version. It
does this by making use of the new Serialize function in btcwire.
Unfortuantely this does entail a public API change which I generally don't
like to do, but eliminating the usage of the protocol version throughout
the codebase was important enough to warrant the change.
To be usd for validation. Most of the codepaths teste, a few tests
missing for cases needed tests in the validation codepaths too. To be
worked on in tree.
We were counting the number of push ops instead of the number of non
push ops. Add tests that found this (checking tha the max operations
check fires).