diff --git a/lib/opcode.js b/lib/opcode.js index 9e4cfe32c..2471fbae2 100644 --- a/lib/opcode.js +++ b/lib/opcode.js @@ -233,4 +233,13 @@ Opcode.isSmallIntOp = function(opcode) { ((opcode >= Opcode.map.OP_1) && (opcode <= Opcode.map.OP_16))); }; +/** + * Will return a string formatted for the console + * + * @returns {String} Script opcode + */ +Opcode.prototype.inspect = function() { + return ''; +}; + module.exports = Opcode; diff --git a/test/opcode.js b/test/opcode.js index 150ef86fe..c0609891b 100644 --- a/test/opcode.js +++ b/test/opcode.js @@ -143,5 +143,10 @@ describe('Opcode', function() { }); + describe('#inspect', function() { + it('should output opcode by name, hex, and decimal', function() { + Opcode.fromString('OP_NOP').inspect().should.equal(''); + }); + }); });