mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Wrap all errors with tracerr
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"github.com/hermeznetwork/tracerr"
|
||||
)
|
||||
|
||||
// MaxFeePlan is the maximum value of the FeePlan
|
||||
@@ -49,7 +51,7 @@ func CalcFeeAmount(amount *big.Int, feeSel FeeSelector) (*big.Int, error) {
|
||||
feeAmount.Rsh(feeAmount, 60)
|
||||
}
|
||||
if feeAmount.BitLen() > 128 { //nolint:gomnd
|
||||
return nil, fmt.Errorf("FeeAmount overflow (feeAmount doesn't fit in 128 bits)")
|
||||
return nil, tracerr.Wrap(fmt.Errorf("FeeAmount overflow (feeAmount doesn't fit in 128 bits)"))
|
||||
}
|
||||
return feeAmount, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user