Address: remove redundant comments
This commit is contained in:
parent
708aa03390
commit
48e15b587a
1 changed files with 0 additions and 4 deletions
|
@ -44,12 +44,10 @@ Address.fromScriptPubKey = function(script, network) {
|
|||
|
||||
var type = script.getOutType()
|
||||
|
||||
// Pay-to-pubKeyHash
|
||||
if (type === 'pubkeyhash') {
|
||||
return new Address(new Buffer(script.chunks[2]), network.pubKeyHash)
|
||||
}
|
||||
|
||||
// Pay-to-scriptHash
|
||||
else if (type === 'scripthash') {
|
||||
return new Address(new Buffer(script.chunks[1]), network.scriptHash)
|
||||
}
|
||||
|
@ -65,12 +63,10 @@ Address.prototype.toBase58Check = function () {
|
|||
Address.prototype.toScriptPubKey = function() {
|
||||
var scriptType = findScriptTypeByVersion(this.version)
|
||||
|
||||
// Pay-to-pubKeyHash
|
||||
if (scriptType === 'pubKeyHash') {
|
||||
return Script.createPubKeyHashScriptPubKey(this.hash)
|
||||
}
|
||||
|
||||
// Pay-to-scriptHash
|
||||
else if (scriptType === 'scriptHash') {
|
||||
return Script.createP2SHScriptPubKey(this.hash)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue