diff --git a/app/api/coreApi.js b/app/api/coreApi.js index a7f8498..8ab32eb 100644 --- a/app/api/coreApi.js +++ b/app/api/coreApi.js @@ -144,15 +144,15 @@ function shouldCacheTransaction(tx) { function getBlockchainInfo() { - return tryCacheThenRpcApi(miscCache, "getBlockchainInfo", 10000, rpcApi.getBlockchainInfo); + return tryCacheThenRpcApi(miscCache, "getBlockchainInfo", 10 * 1000, rpcApi.getBlockchainInfo); } function getNetworkInfo() { - return tryCacheThenRpcApi(miscCache, "getNetworkInfo", 10000, rpcApi.getNetworkInfo); + return tryCacheThenRpcApi(miscCache, "getNetworkInfo", 10 * 1000, rpcApi.getNetworkInfo); } function getNetTotals() { - return tryCacheThenRpcApi(miscCache, "getNetTotals", 10000, rpcApi.getNetTotals); + return tryCacheThenRpcApi(miscCache, "getNetTotals", 10 * 1000, rpcApi.getNetTotals); } function getMempoolInfo() { @@ -160,7 +160,7 @@ function getMempoolInfo() { } function getMiningInfo() { - return tryCacheThenRpcApi(miscCache, "getMiningInfo", 30000, rpcApi.getMiningInfo); + return tryCacheThenRpcApi(miscCache, "getMiningInfo", 30 * 1000, rpcApi.getMiningInfo); } function getUptimeSeconds() { @@ -168,7 +168,7 @@ function getUptimeSeconds() { } function getChainTxStats(blockCount) { - return tryCacheThenRpcApi(miscCache, "getChainTxStats-" + blockCount, 1200000, function() { + return tryCacheThenRpcApi(miscCache, "getChainTxStats-" + blockCount, 20 * 60 * 1000, function() { return rpcApi.getChainTxStats(blockCount); }); } @@ -512,7 +512,7 @@ function getMempoolStats() { var fee = txMempoolInfo.modifiedfee; var size = txMempoolInfo.vsize ? txMempoolInfo.vsize : txMempoolInfo.size; var feePerByte = txMempoolInfo.modifiedfee / size; - var satoshiPerByte = feePerByte * 100000000; + var satoshiPerByte = feePerByte * 100000000; // TODO: magic number - replace with coinConfig.baseCurrencyUnit.multiplier var age = Date.now() / 1000 - txMempoolInfo.time; var addedToBucket = false; diff --git a/app/coins/btc.js b/app/coins/btc.js index a456268..780d67e 100644 --- a/app/coins/btc.js +++ b/app/coins/btc.js @@ -63,6 +63,7 @@ module.exports = { "https://raw.githubusercontent.com/blockchain/Blockchain-Known-Pools/master/pools.json" ], maxBlockWeight: 4000000, + maxBlockSize: 1000000, targetBlockTimeSeconds: 600, currencyUnits:currencyUnits, currencyUnitsByName:{"BTC":currencyUnits[0], "mBTC":currencyUnits[1], "bits":currencyUnits[2], "sat":currencyUnits[3]},