1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-28 00:27:45 +02:00

Parametrize tendermint endpoint based on env vars

This commit is contained in:
Sylvain Bellemare 2017-11-15 16:37:10 +01:00
parent 9ccf676204
commit 67c8bba17b

View File

@ -1,7 +1,8 @@
from copy import deepcopy
from uuid import uuid4
import logging import logging
from collections import namedtuple from collections import namedtuple
from copy import deepcopy
from os import getenv
from uuid import uuid4
import requests import requests
@ -14,7 +15,9 @@ from bigchaindb.tendermint.utils import encode_transaction
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
ENDPOINT = 'http://localhost:46657/' TENDERMINT_HOST = getenv('TENDERMINT_HOST', 'localhost')
TENDERMINT_PORT = getenv('TENDERMINT_PORT', '46657')
ENDPOINT = 'http://{}:{}/'.format(TENDERMINT_HOST, TENDERMINT_PORT)
class BigchainDB(Bigchain): class BigchainDB(Bigchain):