Filter address in log sync.

This commit is contained in:
Peilun Li 2024-01-16 17:54:23 +08:00
parent 9058467be1
commit e236c2f70a
3 changed files with 4 additions and 3 deletions

View File

@ -143,6 +143,7 @@ impl LogEntryFetcher {
let mut filter = contract
.submit_filter()
.from_block(start_block_number)
.address(contract.address().into())
.filter;
debug!("start_watch starts, start={}", start_block_number);
let mut filter_id =
@ -160,7 +161,7 @@ impl LogEntryFetcher {
{
Err(e) => {
error!("log sync watch error: e={:?}", e);
filter = filter.from_block(progress);
filter = filter.from_block(progress).address(contract.address());
filter_id = repeat_run_and_log(|| {
provider.new_filter(FilterKind::Logs(&filter))
})

@ -1 +1 @@
Subproject commit 307f5b17d178df643dd981d63495bb2c92455f5f
Subproject commit 5d32ed0df9bd0c6e95ffe4d11e06ceed233a23af

@ -1 +1 @@
Subproject commit 171cebffffdd82bf464dea85539458bcafbd73ef
Subproject commit da8aa6ed92aaf0664855211df9370280543742dc