Use var for compatibility

master
Dan Finlay 8 years ago
parent 28a2a40a0c
commit f01b024c65
No known key found for this signature in database
GPG Key ID: 931102F24B36007A

@ -1,20 +1,20 @@
const sha3 = require('js-sha3').keccak_256
const uts46 = require('idna-uts46')
var sha3 = require('js-sha3').keccak_256
var uts46 = require('idna-uts46')
module.exports = function namehash (inputName) {
// Reject empty names:
let node = ''
for (let i = 0; i < 32; i++) {
var node = ''
for (var i = 0; i < 32; i++) {
node += '00'
}
name = normalize(inputName)
if (name) {
const labels = name.split('.')
var labels = name.split('.')
for(var i = labels.length - 1; i >= 0; i--) {
const labelSha = sha3(labels[i])
var labelSha = sha3(labels[i])
node = sha3(new Buffer(node + labelSha, 'hex'))
}
}

Loading…
Cancel
Save