Browse Source

Address: remove redundant comments

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
48e15b587a
  1. 4
      src/address.js

4
src/address.js

@ -44,12 +44,10 @@ Address.fromScriptPubKey = function(script, network) {
var type = script.getOutType() var type = script.getOutType()
// Pay-to-pubKeyHash
if (type === 'pubkeyhash') { if (type === 'pubkeyhash') {
return new Address(new Buffer(script.chunks[2]), network.pubKeyHash) return new Address(new Buffer(script.chunks[2]), network.pubKeyHash)
} }
// Pay-to-scriptHash
else if (type === 'scripthash') { else if (type === 'scripthash') {
return new Address(new Buffer(script.chunks[1]), network.scriptHash) return new Address(new Buffer(script.chunks[1]), network.scriptHash)
} }
@ -65,12 +63,10 @@ Address.prototype.toBase58Check = function () {
Address.prototype.toScriptPubKey = function() { Address.prototype.toScriptPubKey = function() {
var scriptType = findScriptTypeByVersion(this.version) var scriptType = findScriptTypeByVersion(this.version)
// Pay-to-pubKeyHash
if (scriptType === 'pubKeyHash') { if (scriptType === 'pubKeyHash') {
return Script.createPubKeyHashScriptPubKey(this.hash) return Script.createPubKeyHashScriptPubKey(this.hash)
} }
// Pay-to-scriptHash
else if (scriptType === 'scriptHash') { else if (scriptType === 'scriptHash') {
return Script.createP2SHScriptPubKey(this.hash) return Script.createP2SHScriptPubKey(this.hash)
} }

Loading…
Cancel
Save