Browse Source

network: testnet should use testnet

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
77b68a52a6
  1. 6
      src/networks.js

6
src/networks.js

@ -54,7 +54,7 @@ var networks = {
wif: 0xef,
dustThreshold: 546,
feePerKb: 10000,
estimateFee: estimateFee('bitcoin')
estimateFee: estimateFee('testnet')
}
}
@ -65,10 +65,10 @@ function estimateFee(type) {
var byteSize = tx.toBuffer().length
var fee = baseFee * Math.ceil(byteSize / 1000)
if(network.dustSoftThreshold == undefined) return fee
if (network.dustSoftThreshold == undefined) return fee
tx.outs.forEach(function(e){
if(e.value < network.dustSoftThreshold) {
if (e.value < network.dustSoftThreshold) {
fee += baseFee
}
})

Loading…
Cancel
Save