Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
THORNode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
THORChain
THORNode
Commits
a839f1fd
Commit
a839f1fd
authored
1 year ago
by
Heimdall
Browse files
Options
Downloads
Patches
Plain Diff
Only change maxgas when tx out item scheduled to a new vault
parent
d9dff8ec
No related branches found
No related tags found
Loading
Pipeline
#896230461
passed
1 year ago
Stage: reset
Stage: generate
Stage: test
Stage: build
Stage: long-test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x/thorchain/manager_slasher_current.go
+17
-17
17 additions, 17 deletions
x/thorchain/manager_slasher_current.go
with
17 additions
and
17 deletions
x/thorchain/manager_slasher_current.go
+
17
−
17
View file @
a839f1fd
...
...
@@ -382,26 +382,26 @@ func (s *SlasherV112) LackSigning(ctx cosmos.Context, mgr Manager) error {
}
// Save the tx to as a new tx, select Asgard to send it this time.
tx
.
VaultPubKey
=
vault
.
PubKey
}
// update max gas
maxGas
,
err
:=
mgr
.
GasMgr
()
.
GetMaxGas
(
ctx
,
tx
.
Chain
)
if
err
!=
nil
{
ctx
.
Logger
()
.
Error
(
"fail to get max gas"
,
"error"
,
err
)
}
else
{
tx
.
MaxGas
=
common
.
Gas
{
maxGas
}
// Update MaxGas in ObservedTxVoter action as well
if
err
:=
updateTxOutGas
(
ctx
,
s
.
keeper
,
tx
,
common
.
Gas
{
maxGas
});
err
!=
nil
{
ctx
.
Logger
()
.
Error
(
"Failed to update MaxGas of action in ObservedTxVoter"
,
"hash"
,
tx
.
InHash
,
"error"
,
err
)
// update max gas
maxGas
,
err
:=
mgr
.
GasMgr
()
.
GetMaxGas
(
ctx
,
tx
.
Chain
)
if
err
!=
nil
{
ctx
.
Logger
()
.
Error
(
"fail to get max gas"
,
"error"
,
err
)
}
else
{
tx
.
MaxGas
=
common
.
Gas
{
maxGas
}
// Update MaxGas in ObservedTxVoter action as well
if
err
:=
updateTxOutGas
(
ctx
,
s
.
keeper
,
tx
,
common
.
Gas
{
maxGas
});
err
!=
nil
{
ctx
.
Logger
()
.
Error
(
"Failed to update MaxGas of action in ObservedTxVoter"
,
"hash"
,
tx
.
InHash
,
"error"
,
err
)
}
}
// Equals checks GasRate so update actions GasRate too (before updating in the queue item)
// for future updates of MaxGas, which must match for matchActionItem in AddOutTx.
gasRate
:=
int64
(
mgr
.
GasMgr
()
.
GetGasRate
(
ctx
,
tx
.
Chain
)
.
Uint64
())
if
err
:=
updateTxOutGasRate
(
ctx
,
s
.
keeper
,
tx
,
gasRate
);
err
!=
nil
{
ctx
.
Logger
()
.
Error
(
"Failed to update GasRate of action in ObservedTxVoter"
,
"hash"
,
tx
.
InHash
,
"error"
,
err
)
}
tx
.
GasRate
=
gasRate
}
// Equals checks GasRate so update actions GasRate too (before updating in the queue item)
// for future updates of MaxGas, which must match for matchActionItem in AddOutTx.
gasRate
:=
int64
(
mgr
.
GasMgr
()
.
GetGasRate
(
ctx
,
tx
.
Chain
)
.
Uint64
())
if
err
:=
updateTxOutGasRate
(
ctx
,
s
.
keeper
,
tx
,
gasRate
);
err
!=
nil
{
ctx
.
Logger
()
.
Error
(
"Failed to update GasRate of action in ObservedTxVoter"
,
"hash"
,
tx
.
InHash
,
"error"
,
err
)
}
tx
.
GasRate
=
gasRate
// if a pool with the asset name doesn't exist, skip rescheduling
if
!
tx
.
Coin
.
Asset
.
IsRune
()
&&
!
s
.
keeper
.
PoolExist
(
ctx
,
tx
.
Coin
.
Asset
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment