omni / token-bridge

Oracle service for TokenBridge. TB is an interoperability solution between Ethereum networks for native to ERC20 and ERC20 to ERC20 cross chain transfers
109 stars 54 forks source link

Fix issue with start block parameters #102

Closed fvictorio closed 6 years ago

fvictorio commented 6 years ago

Closes #87.

Note that the names HOME_START_BLOCK and FOREIGN_START_BLOCK may be misleading: they are being interpreted as "last processed", so it will actually start from HOME_START_BLOCK + 1.

@akolotov do you think we should fix this? We can change the variable names to better reflect what they do, or we can fix it by subtracting 1 to them when they are used as last processed block numbers.

akolotov commented 6 years ago

I think HOME_START_BLOCK and FOREIGN_START_BLOCK should points to the blocks we need to start looking for events from. So, they need to be included in the very first eth_getLogs call.

fvictorio commented 6 years ago

Done. To simplify things, I made sure that lastProcessedBlock is always a BN. Otherwise we are always guessing if it is a string, a number or a bignumber.

akolotov commented 6 years ago

You need to merge to develop (please create it) not to master.

fvictorio commented 6 years ago

You need to merge to develop (please create it) not to master.

Oh, sorry. I just opened #103.