opcode: less redundant indentation

This commit is contained in:
Daniel Cousens 2014-05-10 11:35:53 +10:00
parent 1fe8282eda
commit 554ba250b9

View file

@ -1,5 +1,4 @@
var Opcode = { var ops = {
map: {
// push value // push value
OP_0 : 0, OP_0 : 0,
OP_FALSE : 0, OP_FALSE : 0,
@ -136,12 +135,16 @@ var Opcode = {
OP_PUBKEYHASH : 253, OP_PUBKEYHASH : 253,
OP_PUBKEY : 254, OP_PUBKEY : 254,
OP_INVALIDOPCODE : 255 OP_INVALIDOPCODE : 255
},
reverseMap: []
} }
for(var i in Opcode.map) { var reverse = []
Opcode.reverseMap[Opcode.map[i]] = i for (var op in ops) {
var code = ops[code]
reverse[code] = op
} }
module.exports = Opcode module.exports = {
map: ops,
reverseMap: reverse
}