mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 04:57:17 +00:00
25 lines
473 B
Go
25 lines
473 B
Go
package commands
|
|
|
|
import (
|
|
"context"
|
|
|
|
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
|
|
|
"github.com/ledgerwatch/erigon/common/hexutil"
|
|
)
|
|
|
|
func (api *OtterscanAPIImpl) GetTransactionError(ctx context.Context, hash libcommon.Hash) (hexutil.Bytes, error) {
|
|
tx, err := api.db.BeginRo(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
defer tx.Rollback()
|
|
|
|
result, err := api.runTracer(ctx, tx, hash, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return result.Revert(), nil
|
|
}
|