Revision 5f92df59c8ea01930d2e9e1d238806885fb2d591 authored by Raphaël Proust on 27 June 2019, 00:19:25 UTC, committed by Pierre Boutillier on 21 October 2019, 12:25:24 UTC
The Michelson documentation states that `COMPARE` pushes -1 (resp. 1) if the top element of the stack is smaller (resp. greater) than the second. However, the implementation can actually push a negative number instead of -1 and a positive number instead of 1 depending on the type and values. This semantics should not break any code as the result of `COMPARE` is almost always comsumed by comparison projectors such as `GT` or `LT` who only care about the sign. However, for the sake of consistency, this patches makes `COMPARE` return only -1, 0 or 1. This fixes issue #546
1 parent 36fbc8d
File | Mode | Size |
---|---|---|
__init__.py | -rw-r--r-- | 0 bytes |
baker.py | -rw-r--r-- | 1.6 KB |
endorser.py | -rw-r--r-- | 1.3 KB |
node.py | -rw-r--r-- | 6.8 KB |
utils.py | -rw-r--r-- | 962 bytes |
Computing file changes ...