Fixed minor bugs in eth-watcher
This commit is contained in:
parent
f96cc30397
commit
7f6030ee94
|
@ -1,11 +1,11 @@
|
|||
HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0
|
||||
HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e
|
||||
HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc
|
||||
HOME_START_BLOCK=13276224
|
||||
HOME_MAX_FETCH_RANGE_SIZE=10
|
||||
HOME_BRIDGE_ADDRESS=0x01eD0d6350542E7643cB7bba4bccc96FedE0B616
|
||||
HOME_TOKEN_ADDRESS=0x7c7daEf752C80A6d229D4a642B9336ceCd7e26b0
|
||||
HOME_START_BLOCK=14760000
|
||||
HOME_MAX_FETCH_RANGE_SIZE=50
|
||||
|
||||
SIDE_RPC_URL=https://sokol.poa.network
|
||||
SIDE_SHARED_DB_ADDRESS=0xda9a1cA2Fcb18cAB02934269369627D2b4ea8902
|
||||
SIDE_SHARED_DB_ADDRESS=0x7B307e73Ba9808BcA7cf24F1E7Ae9372faCeD102
|
||||
|
||||
FOREIGN_URL=https://testnet-dex.binance.org/
|
||||
FOREIGN_CHAIN_ID=Binance-Chain-Nile
|
||||
|
@ -24,4 +24,4 @@ VOTES_PROXY_PORT=5001
|
|||
|
||||
SIGN_RESTART_PORT=6001
|
||||
|
||||
LOG_LEVEL=info
|
||||
LOG_LEVEL=trace
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0
|
||||
HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e
|
||||
HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc
|
||||
HOME_START_BLOCK=13276224
|
||||
HOME_MAX_FETCH_RANGE_SIZE=10
|
||||
HOME_BRIDGE_ADDRESS=0x01eD0d6350542E7643cB7bba4bccc96FedE0B616
|
||||
HOME_TOKEN_ADDRESS=0x7c7daEf752C80A6d229D4a642B9336ceCd7e26b0
|
||||
HOME_START_BLOCK=14760000
|
||||
HOME_MAX_FETCH_RANGE_SIZE=50
|
||||
|
||||
SIDE_RPC_URL=https://sokol.poa.network
|
||||
SIDE_SHARED_DB_ADDRESS=0xda9a1cA2Fcb18cAB02934269369627D2b4ea8902
|
||||
SIDE_SHARED_DB_ADDRESS=0x7B307e73Ba9808BcA7cf24F1E7Ae9372faCeD102
|
||||
|
||||
FOREIGN_URL=https://testnet-dex.binance.org/
|
||||
FOREIGN_CHAIN_ID=Binance-Chain-Nile
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0
|
||||
HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e
|
||||
HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc
|
||||
HOME_START_BLOCK=13276224
|
||||
HOME_MAX_FETCH_RANGE_SIZE=10
|
||||
HOME_BRIDGE_ADDRESS=0x01eD0d6350542E7643cB7bba4bccc96FedE0B616
|
||||
HOME_TOKEN_ADDRESS=0x7c7daEf752C80A6d229D4a642B9336ceCd7e26b0
|
||||
HOME_START_BLOCK=14760000
|
||||
HOME_MAX_FETCH_RANGE_SIZE=50
|
||||
|
||||
SIDE_RPC_URL=https://sokol.poa.network
|
||||
SIDE_SHARED_DB_ADDRESS=0xda9a1cA2Fcb18cAB02934269369627D2b4ea8902
|
||||
SIDE_SHARED_DB_ADDRESS=0x7B307e73Ba9808BcA7cf24F1E7Ae9372faCeD102
|
||||
|
||||
FOREIGN_URL=https://testnet-dex.binance.org/
|
||||
FOREIGN_CHAIN_ID=Binance-Chain-Nile
|
||||
|
|
|
@ -3,7 +3,7 @@ HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0
|
|||
#HOME_PRIVATE_KEY is taken from src/deploy/.keys.staging
|
||||
|
||||
#Set to '0x' for redeployment of token contract in staging environment
|
||||
HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc
|
||||
HOME_TOKEN_ADDRESS=0x7c7daEf752C80A6d229D4a642B9336ceCd7e26b0
|
||||
|
||||
VALIDATOR_ADDRESS_1=0xaaaaB15630f63cA01bb50943AaAb4008CB53748D
|
||||
VALIDATOR_ADDRESS_2=0xbbbb63D6Fc58bD14dAF9eeF653650c4D10f3dBC8
|
||||
|
|
|
@ -6,7 +6,7 @@ const logger = require('./logger')
|
|||
const redis = require('./db')
|
||||
const { connectRabbit, assertQueue } = require('./amqp')
|
||||
const { publicKeyToAddress } = require('./crypto')
|
||||
const { delay } = require('./wait')
|
||||
const { delay, retry } = require('./wait')
|
||||
|
||||
const {
|
||||
HOME_RPC_URL, HOME_BRIDGE_ADDRESS, RABBITMQ_URL, HOME_START_BLOCK, VALIDATOR_PRIVATE_KEY
|
||||
|
@ -266,7 +266,7 @@ async function loop() {
|
|||
|
||||
for (let curBlockNumber = blockNumber, i = 0; curBlockNumber <= endBlock; curBlockNumber += 1) {
|
||||
let epochTimeUpdated = false
|
||||
const curBlockTimestamp = await getBlockTimestamp(curBlockNumber)
|
||||
const curBlockTimestamp = await retry(() => getBlockTimestamp(curBlockNumber))
|
||||
while (i < bridgeEvents.length && bridgeEvents[i].blockNumber === curBlockNumber) {
|
||||
const event = bridge.interface.parseLog(bridgeEvents[i])
|
||||
logger.trace('Consumed event %o %o', event, bridgeEvents[i])
|
||||
|
@ -334,7 +334,7 @@ async function loop() {
|
|||
|
||||
blockNumber = endBlock + 1
|
||||
// Exec redis tx
|
||||
await redisTx.incr('homeBlock').exec()
|
||||
await redisTx.set('homeBlock', blockNumber).exec()
|
||||
await redis.save()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0
|
||||
HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc
|
||||
HOME_TOKEN_ADDRESS=0x7c7daEf752C80A6d229D4a642B9336ceCd7e26b0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0
|
||||
HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e
|
||||
HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc
|
||||
HOME_BRIDGE_ADDRESS=0x01eD0d6350542E7643cB7bba4bccc96FedE0B616
|
||||
HOME_TOKEN_ADDRESS=0x7c7daEf752C80A6d229D4a642B9336ceCd7e26b0
|
||||
|
||||
#HOME_PRIVATE_KEY is taken from src/test-services/.keys.staging
|
||||
|
|
Loading…
Reference in New Issue