Skip to content

Commit

Permalink
rm unused
Browse files Browse the repository at this point in the history
  • Loading branch information
rus-alex committed Jul 27, 2023
1 parent d4964e9 commit 4b23c4e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 95 deletions.
16 changes: 0 additions & 16 deletions cmd/opera/launcher/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,6 @@ EVM export mode is configured with --export.evm.mode.
opera export evm-keys
Requires a first argument of the DB directory to write to.
`,
},
{
Name: "graph",
Usage: "Export events DAG",
ArgsUsage: "<filename> [<epochFrom> <epochTo>]",
Action: utils.MigrateFlags(exportDAGgraph),
Flags: []cli.Flag{
DataDirFlag,
},
Description: `
opera export graph
Requires a first argument of the file to write to.
Optional second and third arguments control the first and
last epoch to write
`,
},
},
Expand Down
18 changes: 18 additions & 0 deletions cmd/opera/launcher/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import (
"github.com/ethereum/go-ethereum/rlp"
"github.com/status-im/keycard-go/hexutils"
"github.com/syndtr/goleveldb/leveldb/opt"
"gonum.org/v1/gonum/graph/encoding/dot"
"gopkg.in/urfave/cli.v1"

"github.com/Fantom-foundation/go-opera/gossip"
"github.com/Fantom-foundation/go-opera/utils/dag"
"github.com/Fantom-foundation/go-opera/utils/dbutil/autocompact"
)

Expand Down Expand Up @@ -131,6 +133,22 @@ func exportRLP(w io.Writer, gdb *gossip.Store, from, to idx.Epoch) (err error) {
return
}

// exportDOT writer the active chain.
func exportDOT(writer io.Writer, gdb *gossip.Store, from, to idx.Epoch) (err error) {
graph := dag.Graph(gdb, from, to)
buf, err := dot.Marshal(graph, "DAG", "", "\t")
if err != nil {
return err
}

_, err = writer.Write(buf)
if err != nil {
return err
}

return nil
}

func exportEvmKeys(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
Expand Down
79 changes: 0 additions & 79 deletions cmd/opera/launcher/export_dag.go

This file was deleted.

0 comments on commit 4b23c4e

Please sign in to comment.