Merge pull request from coinpunk/opcodecleanups

new Opcode() is not used
This commit is contained in:
Wei Lu 2014-03-07 15:26:37 +08:00
commit 78c257ff9b

View file

@ -1,12 +1,5 @@
var Opcode = function (num) {
this.code = num;
};
Opcode.prototype.toString = function () {
return Opcode.reverseMap[this.code];
};
Opcode.map = {
Opcode = {
map: {
// push value
OP_0 : 0,
OP_FALSE : 0,
@ -143,12 +136,12 @@ Opcode.map = {
OP_PUBKEYHASH : 253,
OP_PUBKEY : 254,
OP_INVALIDOPCODE : 255
};
Opcode.reverseMap = [];
for (var i in Opcode.map) {
Opcode.reverseMap[Opcode.map[i]] = i;
},
reverseMap: []
}
module.exports = Opcode;
for(var i in Opcode.map) {
Opcode.reverseMap[Opcode.map[i]] = i
}
module.exports = Opcode