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
d7dfc942
Commit
d7dfc942
authored
Nov 27, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug for validator submit transfer
parent
0014e111
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
dao.go
dao/dao.go
+8
-4
eth.go
dao/eth.go
+6
-3
No files found.
dao/dao.go
View file @
d7dfc942
...
...
@@ -7,6 +7,7 @@ import (
"context"
"crypto/ecdsa"
"fmt"
"github.com/ethereum/go-ethereum/common/lru"
"github.com/ethereum/go-ethereum/crypto"
log
"github.com/sirupsen/logrus"
"strings"
...
...
@@ -33,14 +34,17 @@ type Dao struct {
wg
sync
.
WaitGroup
handleMux
sync
.
Mutex
validatorPk
*
ecdsa
.
PrivateKey
failedEvent
*
lru
.
Cache
[
uint
,
bool
]
}
func
New
(
_c
*
config
.
Config
)
(
dao
*
Dao
,
err
error
)
{
dao
=
&
Dao
{
c
:
_c
,
chainGroup
:
make
(
map
[
int64
]
ChainInfo
),
syncer
:
make
(
map
[
int64
]
ChainInterface
),
quit
:
make
(
chan
struct
{}),
c
:
_c
,
chainGroup
:
make
(
map
[
int64
]
ChainInfo
),
syncer
:
make
(
map
[
int64
]
ChainInterface
),
quit
:
make
(
chan
struct
{}),
failedEvent
:
lru
.
NewCache
[
uint
,
bool
](
1000
),
}
if
len
(
_c
.
OTPKeyPath
)
>
0
&&
len
(
_c
.
AesKeyPath
)
>
0
{
...
...
dao/eth.go
View file @
d7dfc942
...
...
@@ -258,9 +258,11 @@ func (d *Dao) HandleTasks() {
continue
}
if
event
.
UpdatedAt
.
Compare
(
event
.
CreatedAt
)
>
0
&&
(
int
(
time
.
Now
()
.
Sub
(
event
.
UpdatedAt
)
.
Seconds
())
<
d
.
c
.
TaskRetryInterval
)
{
// skip recently failed tasks.
continue
if
failed
,
_
:=
d
.
failedEvent
.
Get
(
event
.
ID
);
failed
{
if
event
.
UpdatedAt
.
Compare
(
event
.
CreatedAt
)
>
0
&&
(
int
(
time
.
Now
()
.
Sub
(
event
.
UpdatedAt
)
.
Seconds
())
<
d
.
c
.
TaskRetryInterval
)
{
// skip recently failed tasks.
continue
}
}
if
err
:=
d
.
SubmitInTransfer
(
event
);
err
!=
nil
{
...
...
@@ -268,6 +270,7 @@ func (d *Dao) HandleTasks() {
"fromChain"
:
event
.
FromChain
,
"txhash"
:
event
.
FromChainTxHash
,
})
.
Error
(
"failed to submit in transfer"
)
d
.
failedEvent
.
Add
(
event
.
ID
,
true
)
}
else
{
log
.
WithFields
(
log
.
Fields
{
"fromChain"
:
event
.
FromChain
,
...
...
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