Skip to content

Commit

Permalink
Add possibility to override MinGasPrice in NetworkRules
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Kalina committed Jul 28, 2023
1 parent aa88d69 commit db507c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opera/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ func UpdateRules(src Rules, diff []byte) (res Rules, err error) {
res = changed
res.NetworkID = src.NetworkID
res.Name = src.Name
// norma specific override of MinGasPrice by overridden value
if res.Economy.OverrideMinGasPrice != nil {
res.Economy.MinGasPrice = res.Economy.OverrideMinGasPrice
}
return
}
3 changes: 3 additions & 0 deletions opera/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ type EconomyRules struct {

MinGasPrice *big.Int

// norma specific override of MinGasPrice
OverrideMinGasPrice *big.Int

ShortGasPower GasPowerRules
LongGasPower GasPowerRules
}
Expand Down

0 comments on commit db507c5

Please sign in to comment.