mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Run go-instrument-errors to wrap errors
This commit is contained in:
@@ -53,7 +53,7 @@ type L1Tx struct {
|
||||
func NewL1Tx(tx *L1Tx) (*L1Tx, error) {
|
||||
txTypeOld := tx.Type
|
||||
if err := tx.SetType(); err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// If original Type doesn't match the correct one, return error
|
||||
if txTypeOld != "" && txTypeOld != tx.Type {
|
||||
@@ -63,7 +63,7 @@ func NewL1Tx(tx *L1Tx) (*L1Tx, error) {
|
||||
|
||||
txIDOld := tx.TxID
|
||||
if err := tx.SetID(); err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// If original TxID doesn't match the correct one, return error
|
||||
if txIDOld != (TxID{}) && txIDOld != tx.TxID {
|
||||
|
||||
@@ -27,7 +27,7 @@ type L2Tx struct {
|
||||
func NewL2Tx(tx *L2Tx) (*L2Tx, error) {
|
||||
txTypeOld := tx.Type
|
||||
if err := tx.SetType(); err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// If original Type doesn't match the correct one, return error
|
||||
if txTypeOld != "" && txTypeOld != tx.Type {
|
||||
@@ -37,7 +37,7 @@ func NewL2Tx(tx *L2Tx) (*L2Tx, error) {
|
||||
|
||||
txIDOld := tx.TxID
|
||||
if err := tx.SetID(); err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// If original TxID doesn't match the correct one, return error
|
||||
if txIDOld != (TxID{}) && txIDOld != tx.TxID {
|
||||
|
||||
@@ -53,7 +53,7 @@ type PoolL2Tx struct {
|
||||
func NewPoolL2Tx(tx *PoolL2Tx) (*PoolL2Tx, error) {
|
||||
txTypeOld := tx.Type
|
||||
if err := tx.SetType(); err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// If original Type doesn't match the correct one, return error
|
||||
if txTypeOld != "" && txTypeOld != tx.Type {
|
||||
@@ -63,7 +63,7 @@ func NewPoolL2Tx(tx *PoolL2Tx) (*PoolL2Tx, error) {
|
||||
|
||||
txIDOld := tx.TxID
|
||||
if err := tx.SetID(); err != nil {
|
||||
return nil, err
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
// If original TxID doesn't match the correct one, return error
|
||||
if txIDOld != (TxID{}) && txIDOld != tx.TxID {
|
||||
|
||||
Reference in New Issue
Block a user