Skip to content

Instantly share code, notes, and snippets.

@Christewart
Last active May 5, 2016 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Christewart/b0a077cb1a0e3a1a37a36755bd32c2db to your computer and use it in GitHub Desktop.
Save Christewart/b0a077cb1a0e3a1a37a36755bd32c2db to your computer and use it in GitHub Desktop.
//prints the op code being executed & the stack state BEFORE op code execution
#include "utilstrencodings.h"
#include "streams.h"
#include "script.h"
cout << "Op being executed: " << GetOpName(opcode) << "\n";
for (unsigned int i = 0; i < stack.size(); i++) {
for (unsigned int j = 0; j < stack[i].size(); j++) {
ss << stack[i][j];
}
ss << ' ';
}
printf("Stack: %s\n", HexStr(ss).c_str());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment