Got first unit and integration tests for electrumx

This commit is contained in:
Chris Troutner
2020-04-07 10:49:05 -07:00
parent 708488d928
commit 8910bfd33b
5 changed files with 191 additions and 41 deletions
+29
View File
@@ -0,0 +1,29 @@
/*
Config settings for working with an ElectrumX or Fulcrum server.
*/
const config = {
port: 8000,
electrum: {
application: 'bch-api',
version: '1.4.1',
confidence: 2,
distribution: 3,
// servers: [
// 'fulcrum.fountainhead.cash:50002',
// 'electrum.imaginary.cash:50002',
// 'bch.imaginary.cash:50002',
// 'electroncash.de:50002',
// 'electroncash.dk:50002',
// 'electron.jochen-hoenicke.de:51002'
// ]
serverUrl: 'fulcrum.fountainhead.cash',
serverPort: '50002'
},
ratelimit: {
windowMs: 1 * 60 * 1000,
max: 100
}
}
module.exports = config
+7 -2
View File
@@ -2,6 +2,11 @@
Common configuration settings.
*/
module.exports = {
apiTokenSecret: process.env.TOKENSECRET ? process.env.TOKENSECRET : 'secret-jwt-token'
const electrumxConfig = require('./electrumx')
const config = {
apiTokenSecret: process.env.TOKENSECRET ? process.env.TOKENSECRET : 'secret-jwt-token',
electrumx: electrumxConfig
}
module.exports = config