Browse Source

replace "NODE_IMPORT_FROM_BITCOIND" config property by "NODE_ACTIVE_INDEXER" and "indexer.bitcoind" config option by "indexer.active"

umbrel
kenshin-samourai 5 years ago
parent
commit
6b12beeeb3
  1. 7
      docker/my-dojo/conf/docker-node.conf.tpl
  2. 7
      docker/my-dojo/node/keys.index.js
  3. 9
      keys/index-example.js
  4. 8
      lib/remote-importer/remote-importer.js
  5. 2
      lib/remote-importer/sources-mainnet.js
  6. 2
      lib/remote-importer/sources-testnet.js

7
docker/my-dojo/conf/docker-node.conf.tpl

@ -20,10 +20,9 @@ NODE_ADMIN_KEY=myAdminKey
# Type: alphanumeric # Type: alphanumeric
NODE_JWT_SECRET=myJwtSecret NODE_JWT_SECRET=myJwtSecret
# Data source used for imports and rescans (bitcoind or OXT) # Indexer or third-party service used for imports and rescans of addresses
# Note: support of local bitcoind is an experimental feature # Values: local_bitcoind | third_party_explorer
# Values: active | inactive NODE_ACTIVE_INDEXER=local_bitcoind
NODE_IMPORT_FROM_BITCOIND=active
# FEE TYPE USED FOR FEES ESTIMATIONS BY BITCOIND # FEE TYPE USED FOR FEES ESTIMATIONS BY BITCOIND
# Allowed values are ECONOMICAL or CONSERVATIVE # Allowed values are ECONOMICAL or CONSERVATIVE

7
docker/my-dojo/node/keys.index.js

@ -155,10 +155,9 @@ module.exports = {
* used for fast scan of addresses * used for fast scan of addresses
*/ */
indexer: { indexer: {
// Use local bitcoind for imports and rescans // Active indexer
// or use OXT as a fallback // Values: local_bitcoind | third_party_explorer
// Values: active | inactive active: process.env.NODE_ACTIVE_INDEXER,
bitcoind: process.env.NODE_IMPORT_FROM_BITCOIND,
// Use a SOCKS5 proxy for all communications with external services // Use a SOCKS5 proxy for all communications with external services
// Values: null if no socks5 proxy used, otherwise the url of the socks5 proxy // Values: null if no socks5 proxy used, otherwise the url of the socks5 proxy
socks5Proxy: 'socks5h://172.28.1.4:9050', socks5Proxy: 'socks5h://172.28.1.4:9050',

9
keys/index-example.js

@ -151,10 +151,9 @@ module.exports = {
* used for fast scan of addresses * used for fast scan of addresses
*/ */
indexer: { indexer: {
// Use local bitcoind for imports and rescans // Active indexer
// or use OXT as a fallback // Values: local_bitcoind | local_indexer | third_party_explorer
// Values: active | inactive active: 'local_bitcoind',
bitcoind: 'active',
// Use a SOCKS5 proxy for all communications with external services // Use a SOCKS5 proxy for all communications with external services
// Values: null if no socks5 proxy used, otherwise the url of the socks5 proxy // Values: null if no socks5 proxy used, otherwise the url of the socks5 proxy
socks5Proxy: null, socks5Proxy: null,
@ -271,7 +270,7 @@ module.exports = {
transactions: 50 transactions: 50
}, },
indexer: { indexer: {
bitcoind: 'inactive', active: 'third_party_explorer',
socks5Proxy: null, socks5Proxy: null,
insight: [ insight: [
'https://testnet-api.example.com' 'https://testnet-api.example.com'

8
lib/remote-importer/remote-importer.js

@ -144,9 +144,13 @@ class RemoteImporter {
let gaps = [gap.external, gap.internal] let gaps = [gap.external, gap.internal]
// Allow custom higher gap limits // Allow custom higher gap limits
// for local scans relying on bitcoind // for local scans relying on bitcoind or on a local indexer
if (gapLimit && keys.indexer.bitcoind) if (gapLimit
&& ((keys.indexer.active == 'local_bitcoind')
|| (keys.indexer.active == 'local_indexer'))
) {
gaps = [gapLimit, gapLimit] gaps = [gapLimit, gapLimit]
}
startIndex = (startIndex == null) ? -1 : startIndex - 1 startIndex = (startIndex == null) ? -1 : startIndex - 1

2
lib/remote-importer/sources-mainnet.js

@ -29,7 +29,7 @@ class SourcesMainnet extends Sources {
* Initialize the external data source * Initialize the external data source
*/ */
_initSource() { _initSource() {
if (keys.indexer.bitcoind == 'active') { if (keys.indexer.active == 'local_bitcoind') {
// If local bitcoind option is activated // If local bitcoind option is activated
// we'll use the local node as our unique source // we'll use the local node as our unique source
this.source = new BitcoindWrapper() this.source = new BitcoindWrapper()

2
lib/remote-importer/sources-testnet.js

@ -30,7 +30,7 @@ class SourcesTestnet extends Sources {
* Initialize the external data source * Initialize the external data source
*/ */
_initSource() { _initSource() {
if (keys.indexer.bitcoind == 'active') { if (keys.indexer.active == 'local_bitcoind') {
// If local bitcoind option is activated // If local bitcoind option is activated
// we'll use the local node as our unique source // we'll use the local node as our unique source
this.source = new BitcoindWrapper() this.source = new BitcoindWrapper()

Loading…
Cancel
Save