Browse Source

JSHint: remove defined but never used

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
f5005299d1
  1. 1
      src/ec.js
  2. 1
      src/index.js
  3. 11
      src/transaction.js
  4. 7
      src/wallet.js

1
src/ec.js

@ -6,7 +6,6 @@ var assert = require('assert')
var BigInteger = require('bigi') var BigInteger = require('bigi')
// constants // constants
var TWO = BigInteger.valueOf(2)
var THREE = BigInteger.valueOf(3) var THREE = BigInteger.valueOf(3)
function ECFieldElementFp(q,x) { function ECFieldElementFp(q,x) {

1
src/index.js

@ -1,5 +1,4 @@
var ec = require('./ec') var ec = require('./ec')
var Key = require('./eckey')
var T = require('./transaction') var T = require('./transaction')
module.exports = { module.exports = {

11
src/transaction.js

@ -1,16 +1,15 @@
// FIXME: To all ye that enter here, be weary of Buffers, Arrays and Hex interchanging between the outpoints // FIXME: To all ye that enter here, be weary of Buffers, Arrays and Hex interchanging between the outpoints
var assert = require('assert') var assert = require('assert')
var Address = require('./address')
var BigInteger = require('bigi')
var bufferutils = require('./bufferutils') var bufferutils = require('./bufferutils')
var Script = require('./script')
var convert = require('./convert')
var crypto = require('./crypto') var crypto = require('./crypto')
var ECKey = require('./eckey')
var ecdsa = require('./ecdsa') var ecdsa = require('./ecdsa')
var opcodes = require('./opcodes') var opcodes = require('./opcodes')
var Address = require('./address')
var Script = require('./script')
var ECKey = require('./eckey')
var DEFAULT_SEQUENCE = 0xffffffff var DEFAULT_SEQUENCE = 0xffffffff
function Transaction(doc) { function Transaction(doc) {
@ -154,7 +153,7 @@ Transaction.prototype.toBuffer = function () {
writeUInt32(this.version) writeUInt32(this.version)
writeVarInt(this.ins.length) writeVarInt(this.ins.length)
this.ins.forEach(function(txin, i) { this.ins.forEach(function(txin) {
var hash = new Buffer(txin.outpoint.hash, 'hex') // FIXME: Performance: convert on tx.addInput instead var hash = new Buffer(txin.outpoint.hash, 'hex') // FIXME: Performance: convert on tx.addInput instead
// TxHash hex is big-endian, we need little-endian // TxHash hex is big-endian, we need little-endian

7
src/wallet.js

@ -205,11 +205,12 @@ function Wallet(seed, network) {
return tx return tx
} }
function getCandidateOutputs(value){ function getCandidateOutputs() {
var unspent = [] var unspent = []
for (var key in me.outputs){
for (var key in me.outputs) {
var output = me.outputs[key] var output = me.outputs[key]
if(!output.spend) unspent.push(output) if (!output.spend) unspent.push(output)
} }
var sortByValueDesc = unspent.sort(function(o1, o2){ var sortByValueDesc = unspent.sort(function(o1, o2){

Loading…
Cancel
Save