Page MenuHomePhabricator

Add support for BIN2NUM opcode
ClosedPublic

Authored by deadalnix on Mar 19 2018, 15:23.

Details

Summary

As per title. As the whole number system is LE, I went went for LE encoding. This doesn't seems like a great idea to fubar the scrpipt system even more than it already is by introducing mixed endianess in it.

Test Plan

Added various test cases.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jasonbcox requested changes to this revision.Mar 19 2018, 17:05
jasonbcox added subscribers: schancel, jasonbcox.

Couple nits, then I think we're good to go

src/test/monolith_opcodes.cpp
355 ↗(On Diff #3312)

@schancel and I were hoping to split these tests up a bit. For BIN2NUM and NUM2BIN, please use monolith_opcodes_type.cpp (see https://reviews.bitcoinabc.org/D1103)

415 ↗(On Diff #3312)

nifty

418 ↗(On Diff #3312)

Mege -> Merge

This revision now requires changes to proceed.Mar 19 2018, 17:05
src/test/monolith_opcodes.cpp
355 ↗(On Diff #3312)

There is already a ton of reundancy in that code, so we want to factor that out at some point. It'll be easier in one file.

src/test/monolith_opcodes.cpp
415 ↗(On Diff #3312)

That's elite programming right there XD

Fix as per comment and rebase

This revision is now accepted and ready to land.Mar 19 2018, 17:26
This revision was automatically updated to reflect the committed changes.