Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
token-bridge
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
movabridge
token-bridge
Commits
6bb4f378
Commit
6bb4f378
authored
Sep 05, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
0a8e6898
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
sync.go
chain/sync.go
+8
-2
No files found.
chain/sync.go
View file @
6bb4f378
...
@@ -105,13 +105,19 @@ func (s *ChainSync) loop() {
...
@@ -105,13 +105,19 @@ func (s *ChainSync) loop() {
continue
continue
}
}
if
latestTime
,
err
:=
s
.
d
.
GetBlockTime
(
s
.
chain
,
latest
Height
);
err
==
nil
{
if
beginTime
,
err
:=
s
.
d
.
GetBlockTime
(
s
.
chain
,
begin
Height
);
err
==
nil
{
blockTime
:=
time
.
Unix
(
int64
(
latest
Time
),
0
)
blockTime
:=
time
.
Unix
(
int64
(
begin
Time
),
0
)
if
time
.
Since
(
blockTime
)
<
time
.
Minute
{
if
time
.
Since
(
blockTime
)
<
time
.
Minute
{
s
.
syncmode
=
false
s
.
syncmode
=
false
}
else
{
}
else
{
s
.
syncmode
=
true
s
.
syncmode
=
true
}
}
log
.
WithField
(
"chain"
,
s
.
name
)
.
WithFields
(
log
.
Fields
{
"begin height"
:
beginHeight
,
"block time"
:
blockTime
,
"sync mode"
:
s
.
syncmode
,
"sinceTime"
:
time
.
Since
(
blockTime
)
.
String
(),
})
.
Debug
(
"begin block time"
)
}
}
if
latestHeight
<
endHeight
{
if
latestHeight
<
endHeight
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment