mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Wrap all errors with tracerr
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
ethCommon "github.com/ethereum/go-ethereum/common"
|
||||
ethCrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/hermeznetwork/tracerr"
|
||||
"github.com/iden3/go-iden3-crypto/babyjub"
|
||||
)
|
||||
|
||||
@@ -22,7 +23,7 @@ func (a *AccountCreationAuth) HashToSign() ([]byte, error) {
|
||||
const msg = "I authorize this babyjubjub key for hermez rollup account creation"
|
||||
comp, err := a.BJJ.Compress().MarshalText()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// Hash message (msg || compressed-bjj)
|
||||
return ethCrypto.Keccak256Hash([]byte(msg), comp).Bytes(), nil
|
||||
|
||||
Reference in New Issue
Block a user