mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Add NewFloor40Floor helper method
Also added tracerr.Wrap(...) to missing places.
This commit is contained in:
@@ -179,7 +179,7 @@ func (hdb *HistoryDB) GetBatch(batchNum common.BatchNum) (*common.Batch, error)
|
||||
batch.slot_num, batch.total_fees_usd FROM batch WHERE batch_num = $1;`,
|
||||
batchNum,
|
||||
)
|
||||
return &batch, err
|
||||
return &batch, tracerr.Wrap(err)
|
||||
}
|
||||
|
||||
// GetAllBatches retrieve all batches from the DB
|
||||
@@ -235,7 +235,7 @@ func (hdb *HistoryDB) GetLastBatch() (*common.Batch, error) {
|
||||
batch.num_accounts, batch.last_idx, batch.exit_root, batch.forge_l1_txs_num,
|
||||
batch.slot_num, batch.total_fees_usd FROM batch ORDER BY batch_num DESC LIMIT 1;`,
|
||||
)
|
||||
return &batch, err
|
||||
return &batch, tracerr.Wrap(err)
|
||||
}
|
||||
|
||||
// GetLastL1BatchBlockNum returns the blockNum of the latest forged l1Batch
|
||||
|
||||
@@ -458,7 +458,7 @@ func (k *KVDB) CheckpointExists(batchNum common.BatchNum) (bool, error) {
|
||||
if _, err := os.Stat(source); os.IsNotExist(err) {
|
||||
return false, nil
|
||||
} else if err != nil {
|
||||
return false, err
|
||||
return false, tracerr.Wrap(err)
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user