| | |
| | | |
| | | @Scheduled(cron = "0 0/5 * * * ? ") |
| | | public void chainBlockUpdate() { |
| | | log.info("最新区块更新"); |
| | | BigInteger blockNumber = ChainService.getInstance(ChainEnum.BSC_TFC.name()).blockNumber(); |
| | | |
| | | redisUtils.set(AppContants.REDIS_KEY_BLOCK_ETH_NEWEST_NUM, blockNumber); |
| | |
| | | long start = System.currentTimeMillis(); |
| | | log.info("区块链监听开始启动"); |
| | | Object incrementObj = redisUtils.get(AppContants.REDIS_KEY_BLOCK_ETH_INCREMENT_NUM); |
| | | BigInteger newest = ChainService.getInstance(ChainEnum.BSC_TFC.name()).blockNumber(); |
| | | BigInteger newest = ChainService.getInstance(ChainEnum.BSC_USDT.name()).blockNumber(); |
| | | BigInteger block; |
| | | if (incrementObj == null) { |
| | | block = newest; |