| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM. Just one note: this does make pushing [x] where 1 <= x <= 16 less efficient - one byte can be saved by doing the optimization that push_int was doing
Sorry, something went wrong.
|
While applying @sander2's suggestion, I also realized that pushing [x] satisfying 128 < x < 256 with push_slice resulted in an invalid instruction, so I've split the single element case into 3 parts. This should now both be optimized and functioning properly. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR fixes a bug that causes an unexpected behaviour while pushing Vec<u8> or bitcoin::Witness to the stack. If a single length Vec<u8> was pushed to the stack [x], satisfying 128 <= x < 256, it was being interpreted as pushing [x, 0], causing both numbers pushed through Witness and single length vectors to act unexpectedly.