| | |
| | | |
| | | public final static List<String> ALL_ADDRESS_LIST = new ArrayList<>(); |
| | | |
| | | public final static String USDT_BLOCK_NUM_GOLDEN = "USDT_BLOCK_NUM_GOLDEN"; |
| | | public final static String ETH_USDT_BLOCK_NUM = "ETH_USDT_BLOCK_NUM"; |
| | | |
| | | private final static BigDecimal DIVIDE_USDT = new BigDecimal("1000000"); |
| | | |
| | |
| | | ALL_ADDRESS_LIST.addAll(tdCoinWallets); |
| | | } |
| | | // 获取最新区块 |
| | | String string = redisUtils.getString(USDT_BLOCK_NUM_GOLDEN); |
| | | String string = redisUtils.getString(ETH_USDT_BLOCK_NUM); |
| | | if(string==null){ |
| | | string = "11014249"; |
| | | string = "11892420"; |
| | | } |
| | | BigInteger blockNum = new BigInteger(string); |
| | | Credentials credentials = Credentials.create(privateKey); |
| | |
| | | usdtUpdateProducer.sendMsg(JSONObject.toJSONString(dto)); |
| | | } |
| | | if(map.get("blockNum").compareTo(blockNumber1)!=0){ |
| | | redisUtils.set(USDT_BLOCK_NUM_GOLDEN,blockNumber1.toString()); |
| | | redisUtils.set(ETH_USDT_BLOCK_NUM,blockNumber1.toString()); |
| | | map.put("blockNum",blockNumber1); |
| | | } |
| | | } |