new Opcode() is not used
This commit is contained in:
parent
2f3e597596
commit
6f04743081
1 changed files with 134 additions and 141 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue