Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
gouthamp-stellar committed Sep 30, 2024
1 parent cd321ae commit 43711ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 56 deletions.
44 changes: 0 additions & 44 deletions cmd/utils/custom_set_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package utils

import (
"encoding/json"
"errors"
"fmt"
"os"
"strings"

"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -83,48 +81,6 @@ func SetConfigOptionStellarPrivateKey(co *config.ConfigOption) error {
return nil
}

func SetConfigOptionCaptiveCoreBinPath(co *config.ConfigOption) error {
binPath := viper.GetString(co.Name)

fileInfo, err := os.Stat(binPath)
if errors.Is(err, os.ErrNotExist) {
return fmt.Errorf("binary file %s does not exist", binPath)
}

if fileInfo.IsDir() {
return fmt.Errorf("binary file path %s is a directory, not a file", binPath)
}

key, ok := co.ConfigKey.(*string)
if !ok {
return unexpectedTypeError(key, co)
}
*key = binPath

return nil
}

func SetConfigOptionCaptiveCoreConfigDir(co *config.ConfigOption) error {
dirPath := viper.GetString(co.Name)

fileInfo, err := os.Stat(dirPath)
if errors.Is(err, os.ErrNotExist) {
return fmt.Errorf("captive core configuration files dir %s does not exist", dirPath)
}

if !fileInfo.IsDir() {
return fmt.Errorf("captive core configuration files dir %s is not a directory", dirPath)
}

key, ok := co.ConfigKey.(*string)
if !ok {
return unexpectedTypeError(key, co)
}
*key = dirPath

return nil
}

func SetConfigOptionAssets(co *config.ConfigOption) error {
assetsJSON := viper.GetString(co.Name)

Expand Down
12 changes: 0 additions & 12 deletions internal/utils/ingestion_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,10 @@ func OperationResult(txResult xdr.TransactionResult, opNumber int) *xdr.Operatio
return &tr
}

/*
func OperationResult(tx ingest.LedgerTransaction, opNumber int) *xdr.OperationResultTr {
results, _ := tx.Result.OperationResults()
tr := results[opNumber-1].MustTr()
return &tr
}
*/

func TransactionID(ledgerNumber, txNumber int32) string {
return toid.New(int32(ledgerNumber), int32(txNumber), 0).String()
}

func TransactionHash(ledgerMeta xdr.LedgerCloseMeta, txNumber int) string {
return ledgerMeta.TransactionHash(txNumber - 1).HexString()
}

// Memo returns the memo value parsed to string and its type.
func Memo(memo xdr.Memo, txHash string) (*string, string) {
memoType := memo.Type
Expand Down

0 comments on commit 43711ca

Please sign in to comment.