network: testnet should use testnet

This commit is contained in:
Daniel Cousens 2014-06-18 01:39:08 +10:00
parent 9e2e0bd01a
commit 77b68a52a6

View file

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