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
NODE_JWT_SECRET=myJwtSecret
# Data source used for imports and rescans (bitcoind or OXT)
# Note: support of local bitcoind is an experimental feature
# Values: active | inactive
NODE_IMPORT_FROM_BITCOIND=active
# Indexer or third-party service used for imports and rescans of addresses
# Values: local_bitcoind | third_party_explorer
NODE_ACTIVE_INDEXER=local_bitcoind
# FEE TYPE USED FOR FEES ESTIMATIONS BY BITCOIND
# 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
*/
indexer: {
// Use local bitcoind for imports and rescans
// or use OXT as a fallback
// Values: active | inactive
bitcoind: process.env.NODE_IMPORT_FROM_BITCOIND,
// Active indexer
// Values: local_bitcoind | third_party_explorer
active: process.env.NODE_ACTIVE_INDEXER,
// Use a SOCKS5 proxy for all communications with external services
// Values: null if no socks5 proxy used, otherwise the url of the socks5 proxy
socks5Proxy: 'socks5h://172.28.1.4:9050',

9
keys/index-example.js

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

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

@ -144,9 +144,13 @@ class RemoteImporter {
let gaps = [gap.external, gap.internal]
// Allow custom higher gap limits
// for local scans relying on bitcoind
if (gapLimit && keys.indexer.bitcoind)
// for local scans relying on bitcoind or on a local indexer
if (gapLimit
&& ((keys.indexer.active == 'local_bitcoind')
|| (keys.indexer.active == 'local_indexer'))
) {
gaps = [gapLimit, gapLimit]
}
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
*/
_initSource() {
if (keys.indexer.bitcoind == 'active') {
if (keys.indexer.active == 'local_bitcoind') {
// If local bitcoind option is activated
// we'll use the local node as our unique source
this.source = new BitcoindWrapper()

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

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

Loading…
Cancel
Save