From d6587ba250f86699d88cee8b80461cf44505e324 Mon Sep 17 00:00:00 2001 From: Thomas Jay Rush Date: Mon, 12 Oct 2020 10:17:34 -0400 Subject: [PATCH] Simple file renaming to make automated testing easier (#1230) * Simple file renaming to make automated testing easier * Fixing comment --- .../commands/{get_balance.go => eth_accounts.go} | 0 cmd/rpcdaemon/commands/eth_api.go | 2 +- cmd/rpcdaemon/commands/eth_block.go | 8 ++++++++ cmd/rpcdaemon/commands/{call.go => eth_call.go} | 0 cmd/rpcdaemon/commands/eth_filters.go | 10 ++++++++++ cmd/rpcdaemon/commands/{coinbase.go => eth_mining.go} | 0 cmd/rpcdaemon/commands/eth_system.go | 3 +++ cmd/rpcdaemon/commands/eth_txs.go | 8 ++++++++ .../commands/{get_uncles.go => eth_uncles.go} | 0 9 files changed, 30 insertions(+), 1 deletion(-) rename cmd/rpcdaemon/commands/{get_balance.go => eth_accounts.go} (100%) create mode 100644 cmd/rpcdaemon/commands/eth_block.go rename cmd/rpcdaemon/commands/{call.go => eth_call.go} (100%) create mode 100644 cmd/rpcdaemon/commands/eth_filters.go rename cmd/rpcdaemon/commands/{coinbase.go => eth_mining.go} (100%) create mode 100644 cmd/rpcdaemon/commands/eth_system.go create mode 100644 cmd/rpcdaemon/commands/eth_txs.go rename cmd/rpcdaemon/commands/{get_uncles.go => eth_uncles.go} (100%) diff --git a/cmd/rpcdaemon/commands/get_balance.go b/cmd/rpcdaemon/commands/eth_accounts.go similarity index 100% rename from cmd/rpcdaemon/commands/get_balance.go rename to cmd/rpcdaemon/commands/eth_accounts.go diff --git a/cmd/rpcdaemon/commands/eth_api.go b/cmd/rpcdaemon/commands/eth_api.go index f29e0e756..ba825af3b 100644 --- a/cmd/rpcdaemon/commands/eth_api.go +++ b/cmd/rpcdaemon/commands/eth_api.go @@ -63,7 +63,7 @@ type EthAPI interface { Syncing(ctx context.Context) (interface{}, error) // GasPrice(_ context.Context) (*hexutil.Big, error) - // Sending related (proposed file: ./eth_sending.go) + // Sending related (proposed file: ./eth_call.go) Call(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *map[common.Address]ethapi.Account) (hexutil.Bytes, error) EstimateGas(ctx context.Context, args ethapi.CallArgs) (hexutil.Uint64, error) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) diff --git a/cmd/rpcdaemon/commands/eth_block.go b/cmd/rpcdaemon/commands/eth_block.go new file mode 100644 index 000000000..32f137426 --- /dev/null +++ b/cmd/rpcdaemon/commands/eth_block.go @@ -0,0 +1,8 @@ +package commands + +/* future home of block related eth_ routines */ + +// GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) +// GetBlockByHash(ctx context.Context, hash common.Hash, fullTx bool) (map[string]interface{}, error) +// GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error) +// GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error) diff --git a/cmd/rpcdaemon/commands/call.go b/cmd/rpcdaemon/commands/eth_call.go similarity index 100% rename from cmd/rpcdaemon/commands/call.go rename to cmd/rpcdaemon/commands/eth_call.go diff --git a/cmd/rpcdaemon/commands/eth_filters.go b/cmd/rpcdaemon/commands/eth_filters.go new file mode 100644 index 000000000..105adf196 --- /dev/null +++ b/cmd/rpcdaemon/commands/eth_filters.go @@ -0,0 +1,10 @@ +package commands + +/* future home of filter related eth_ routines */ + +// newPendingTransactionFilter(ctx context.Context) (string, error) +// newBlockFilter(ctx context.Context) (string, error) +// newFilter(ctx context.Context) (string, error) +// uninstallFilter(ctx context.Context) (string, error) +// getFilterChanges(ctx context.Context) (string, error) +// GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*types.Log, error) diff --git a/cmd/rpcdaemon/commands/coinbase.go b/cmd/rpcdaemon/commands/eth_mining.go similarity index 100% rename from cmd/rpcdaemon/commands/coinbase.go rename to cmd/rpcdaemon/commands/eth_mining.go diff --git a/cmd/rpcdaemon/commands/eth_system.go b/cmd/rpcdaemon/commands/eth_system.go new file mode 100644 index 000000000..5884a3c41 --- /dev/null +++ b/cmd/rpcdaemon/commands/eth_system.go @@ -0,0 +1,3 @@ +package commands + +/* future home of system related eth_ routines */ diff --git a/cmd/rpcdaemon/commands/eth_txs.go b/cmd/rpcdaemon/commands/eth_txs.go new file mode 100644 index 000000000..3c07f5323 --- /dev/null +++ b/cmd/rpcdaemon/commands/eth_txs.go @@ -0,0 +1,8 @@ +package commands + +/* future home of tx related eth_ routines */ + +// GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) +// GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error) +// GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error) +// GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) diff --git a/cmd/rpcdaemon/commands/get_uncles.go b/cmd/rpcdaemon/commands/eth_uncles.go similarity index 100% rename from cmd/rpcdaemon/commands/get_uncles.go rename to cmd/rpcdaemon/commands/eth_uncles.go