Skip to content

Commit

Permalink
Update queryAddressSendTxInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
leej1012 committed Dec 23, 2024
1 parent 2eb4c85 commit 70dc133
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ eth.web3j.url=http://polaris1.ont.io:20339

recaptcha.secret.key=

#block.end.2024 = 612800
block.start.2024 =16980451
block.end.2024 = 18316350
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ public String getContractHash(String token) {
@Value("${recaptcha.secret.key}")
public String RECAPTCHA_SECRET_KEY;

@Value("${block.start.2024}")
public int BLOCK_START_2024;

@Value("${block.end.2024}")
public int BLOCK_END_2024;
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,9 @@ public JSONObject queryAddressActiveTime(String address) {
@Override
public JSONObject queryAddressSendTxInfo(String address) {
int firstTxTime = 0;
int startBlock2024 = 16980450;
int txCount = txDetailMapper.selectSendTxCountByBlockHeight(address, startBlock2024, paramsConfig.BLOCK_END_2024);
int txCount = txDetailMapper.selectSendTxCountByBlockHeight(address, paramsConfig.BLOCK_START_2024, paramsConfig.BLOCK_END_2024);
if (txCount > 0) {
TxDetailDto txDetailDto = txDetailMapper.selectFirstSendTxByBlockHeight(address, startBlock2024, paramsConfig.BLOCK_END_2024);
TxDetailDto txDetailDto = txDetailMapper.selectFirstSendTxByBlockHeight(address, paramsConfig.BLOCK_START_2024, paramsConfig.BLOCK_END_2024);
if (txDetailDto != null) {
firstTxTime = txDetailDto.getTxTime();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
SELECT COUNT(DISTINCT tx_hash)
FROM tbl_tx_detail
WHERE from_address = #{address}
AND block_height > #{startBlock}
AND block_height >= #{startBlock}
AND block_height <![CDATA[<=]]> #{endBlock};
</select>

Expand All @@ -677,7 +677,7 @@
<include refid="txDetailColumns"/>
FROM tbl_tx_detail
WHERE from_address = #{address}
AND block_height > #{startBlock}
AND block_height >= #{startBlock}
AND block_height <![CDATA[<=]]> #{endBlock}
ORDER BY block_height LIMIT 1
</select>
Expand Down

0 comments on commit 70dc133

Please sign in to comment.