Fixed global scope leaks in Base58.
This commit is contained in:
parent
09e8c6e184
commit
6e44bdf229
2 changed files with 3 additions and 4 deletions
|
@ -29,8 +29,7 @@
|
|||
} else break;
|
||||
}
|
||||
|
||||
s = chars.join('');
|
||||
return s;
|
||||
return chars.join('');
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -42,7 +41,7 @@
|
|||
* Ported to JavaScript by Stefan Thomas.
|
||||
*/
|
||||
decode: function (input) {
|
||||
bi = BigInteger.valueOf(0);
|
||||
var bi = BigInteger.valueOf(0);
|
||||
var leadingZerosNum = 0;
|
||||
for (var i = input.length - 1; i >= 0; i--) {
|
||||
var alphaIndex = B58.alphabet.indexOf(input[i]);
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
// template matching params
|
||||
OP_PUBKEYHASH : 253,
|
||||
OP_PUBKEY : 254,
|
||||
OP_INVALIDOPCODE : 255,
|
||||
OP_INVALIDOPCODE : 255
|
||||
};
|
||||
|
||||
Opcode.reverseMap = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue