Code Monkey home page Code Monkey logo

btcdeb's People

Contributors

jbaczuk avatar jonasnick avatar kalle2 avatar kallewoof avatar

Watchers

 avatar  avatar

btcdeb's Issues

Op not incrementing properly

I was expected the #0001 to increment and update according to Learning-Bitcoin-from-the-Command-Line

Expected

$ btcdeb '[OP_3 OP_2 OP_ADD OP_4 OP_SUB]'
btcdeb -- type `btcdeb -h` for start up options
valid script
5 op script loaded. type `help` for usage information
script  |  stack
--------+--------
3       |
2       |
OP_ADD  |
4       |
OP_SUB  |
#0001 3
btcdeb> step
		<> PUSH stack 03
script  |  stack
--------+--------
2       |      03
OP_ADD  |
4       |
OP_SUB  |
#0002 2
btcdeb>
		<> PUSH stack 02
script  |  stack
--------+--------
OP_ADD  |      02
4       |      03
OP_SUB  |
#0003 OP_ADD
btcdeb>
		<> POP  stack
		<> POP  stack
		<> PUSH stack 05
script  |  stack
--------+--------
4       |      05
OP_SUB  |
#0004 4
btcdeb>
		<> PUSH stack 04
script  |  stack
--------+--------
OP_SUB  |      04
        |      05
#0005 OP_SUB
btcdeb>
		<> POP  stack
		<> POP  stack
		<> PUSH stack 01
script  |  stack
--------+--------
        |      01

Actual

$ btcdeb '[OP_3 OP_2 OP_ADD OP_4 OP_SUB]'
btcdeb -- type `btcdeb -h` for start up options
valid script
5 op script loaded. type `help` for usage information
script  |  stack
--------+--------
3       |
2       |
OP_ADD  |
4       |
OP_SUB  |
#0001 3
btcdeb> step
		<> PUSH stack 03
script  |  stack
--------+--------
2       |      03
OP_ADD  |
4       |
OP_SUB  |
#0001 3
btcdeb> step
		<> PUSH stack 02
script  |  stack
--------+--------
OP_ADD  |      02
4       |      03
OP_SUB  |
#0001 3
btcdeb>
		<> POP  stack
		<> POP  stack
		<> PUSH stack 05
script  |  stack
--------+--------
4       |      05
OP_SUB  |
#0001 3
btcdeb>
		<> PUSH stack 04
script  |  stack
--------+--------
OP_SUB  |      04
        |      05
#0001 3
btcdeb>
		<> POP  stack
		<> POP  stack
		<> PUSH stack 01
script  |  stack
--------+--------
        |      01
#0001 3

Success/Fail

When there is nothing left in the command queue and an 1 OP_VERIFY executes, display something like:

image

Otherwise:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.