lint.
This commit is contained in:
parent
da3ce0b4a7
commit
c02b93adae
@ -236,7 +236,7 @@ Address.fromBase58 = function fromBase58(address) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Address.prototype.fromScript = function fromScript(script) {
|
Address.prototype.fromScript = function fromScript(script) {
|
||||||
var program, hash;
|
var program;
|
||||||
|
|
||||||
if (script.isWitnessProgram()) {
|
if (script.isWitnessProgram()) {
|
||||||
program = script.toProgram();
|
program = script.toProgram();
|
||||||
@ -301,8 +301,6 @@ Address.prototype.fromScript = function fromScript(script) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Address.prototype.fromWitness = function fromWitness(witness) {
|
Address.prototype.fromWitness = function fromWitness(witness) {
|
||||||
var hash;
|
|
||||||
|
|
||||||
if (witness.isPubkeyhashInput()) {
|
if (witness.isPubkeyhashInput()) {
|
||||||
this.hash = utils.ripesha(witness.items[1]);
|
this.hash = utils.ripesha(witness.items[1]);
|
||||||
this.type = 'witnesspubkeyhash';
|
this.type = 'witnesspubkeyhash';
|
||||||
@ -326,8 +324,6 @@ Address.prototype.fromWitness = function fromWitness(witness) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Address.prototype.fromInputScript = function fromInputScript(script) {
|
Address.prototype.fromInputScript = function fromInputScript(script) {
|
||||||
var hash;
|
|
||||||
|
|
||||||
if (script.isPubkeyhashInput()) {
|
if (script.isPubkeyhashInput()) {
|
||||||
this.hash = utils.ripesha(script.code[1].data);
|
this.hash = utils.ripesha(script.code[1].data);
|
||||||
this.type = 'pubkeyhash';
|
this.type = 'pubkeyhash';
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var constants = require('./protocol/constants');
|
var constants = require('./protocol/constants');
|
||||||
|
var assert = require('assert');
|
||||||
var BufferReader = require('./reader');
|
var BufferReader = require('./reader');
|
||||||
var BufferWriter = require('./writer');
|
var BufferWriter = require('./writer');
|
||||||
|
|
||||||
|
|||||||
@ -420,8 +420,6 @@ MerkleBlock.prototype.toJSON = function toJSON() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
MerkleBlock.prototype.fromJSON = function fromJSON(json) {
|
MerkleBlock.prototype.fromJSON = function fromJSON(json) {
|
||||||
var i;
|
|
||||||
|
|
||||||
assert.equal(json.type, 'merkleblock');
|
assert.equal(json.type, 'merkleblock');
|
||||||
|
|
||||||
this.height = json.height;
|
this.height = json.height;
|
||||||
|
|||||||
@ -11,7 +11,6 @@ var bcoin = require('./env');
|
|||||||
var utils = require('./utils');
|
var utils = require('./utils');
|
||||||
var constants = bcoin.protocol.constants;
|
var constants = bcoin.protocol.constants;
|
||||||
var assert = utils.assert;
|
var assert = utils.assert;
|
||||||
var BufferWriter = require('./writer');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a transaction output.
|
* Represents a transaction output.
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
var bcoin = require('../env');
|
var bcoin = require('../env');
|
||||||
var constants = require('./constants');
|
var constants = require('./constants');
|
||||||
var utils = require('../utils');
|
var utils = require('../utils');
|
||||||
var IP = require('../ip');
|
|
||||||
var assert = utils.assert;
|
var assert = utils.assert;
|
||||||
var BufferWriter = require('../writer');
|
var BufferWriter = require('../writer');
|
||||||
var DUMMY = new Buffer([]);
|
var DUMMY = new Buffer([]);
|
||||||
|
|||||||
@ -11,7 +11,6 @@ var bcoin = require('../env');
|
|||||||
var bn = require('bn.js');
|
var bn = require('bn.js');
|
||||||
var EventEmitter = require('events').EventEmitter;
|
var EventEmitter = require('events').EventEmitter;
|
||||||
var utils = require('../utils');
|
var utils = require('../utils');
|
||||||
var IP = require('../ip');
|
|
||||||
var assert = utils.assert;
|
var assert = utils.assert;
|
||||||
var constants = require('./constants');
|
var constants = require('./constants');
|
||||||
var BufferReader = require('../reader');
|
var BufferReader = require('../reader');
|
||||||
|
|||||||
@ -2772,7 +2772,7 @@ Script.prototype.isWitnessProgram = function isWitnessProgram() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Script.prototype.toProgram = function toProgram() {
|
Script.prototype.toProgram = function toProgram() {
|
||||||
var version, data, type;
|
var version, data;
|
||||||
|
|
||||||
if (!this.isWitnessProgram())
|
if (!this.isWitnessProgram())
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user