Skip to content

Commit

Permalink
Renamed ethapi -> quaiapi and EthAPIbackend -> QuaiAPIBackend
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers authored and wizeguyy committed Jan 25, 2023
1 parent 136980a commit e7b7150
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 88 deletions.
4 changes: 2 additions & 2 deletions cmd/go-quai/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

"github.com/dominant-strategies/go-quai/cmd/utils"
"github.com/dominant-strategies/go-quai/eth/ethconfig"
"github.com/dominant-strategies/go-quai/internal/ethapi"
"github.com/dominant-strategies/go-quai/internal/quaiapi"
"github.com/dominant-strategies/go-quai/log"
"github.com/dominant-strategies/go-quai/metrics"
"github.com/dominant-strategies/go-quai/node"
Expand Down Expand Up @@ -144,7 +144,7 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, quaiConfig) {
}

// makeFullNode loads quai configuration and creates the Ethereum backend.
func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
func makeFullNode(ctx *cli.Context) (*node.Node, quaiapi.Backend) {
stack, cfg := makeConfigNode(ctx)
if ctx.GlobalIsSet(utils.OverrideLondonFlag.Name) {
cfg.Eth.OverrideLondon = new(big.Int).SetUint64(ctx.GlobalUint64(utils.OverrideLondonFlag.Name))
Expand Down
6 changes: 3 additions & 3 deletions cmd/go-quai/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/dominant-strategies/go-quai/eth"
"github.com/dominant-strategies/go-quai/eth/downloader"
"github.com/dominant-strategies/go-quai/internal/debug"
"github.com/dominant-strategies/go-quai/internal/ethapi"
"github.com/dominant-strategies/go-quai/internal/flags"
"github.com/dominant-strategies/go-quai/internal/quaiapi"
"github.com/dominant-strategies/go-quai/log"
"github.com/dominant-strategies/go-quai/metrics"
"github.com/dominant-strategies/go-quai/node"
Expand Down Expand Up @@ -286,7 +286,7 @@ func quai(ctx *cli.Context) error {
// startNode boots up the system node and all registered protocols, after which
// it unlocks any requested accounts, and starts the RPC interfaces and the
// miner.
func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend) {
func startNode(ctx *cli.Context, stack *node.Node, backend quaiapi.Backend) {
debug.Memsize.Add("node", stack)

// Start up the node itself
Expand Down Expand Up @@ -320,7 +320,7 @@ func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend) {
if ctx.GlobalBool(utils.MiningEnabledFlag.Name) || ctx.GlobalBool(utils.DeveloperFlag.Name) {

var err error
ethBackend, ok := backend.(*eth.EthAPIBackend)
ethBackend, ok := backend.(*eth.QuaiAPIBackend)
if !ok {
utils.Fatalf("Ethereum service not running: %v", err)
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import (
"github.com/dominant-strategies/go-quai/eth/gasprice"
"github.com/dominant-strategies/go-quai/ethdb"
"github.com/dominant-strategies/go-quai/ethstats"
"github.com/dominant-strategies/go-quai/internal/ethapi"
"github.com/dominant-strategies/go-quai/internal/flags"
"github.com/dominant-strategies/go-quai/internal/quaiapi"
"github.com/dominant-strategies/go-quai/log"
"github.com/dominant-strategies/go-quai/metrics"
"github.com/dominant-strategies/go-quai/metrics/exp"
Expand Down Expand Up @@ -1480,7 +1480,7 @@ func SetDNSDiscoveryDefaults(cfg *ethconfig.Config, genesis common.Hash) {
// RegisterEthService adds an Ethereum client to the stack.
// The second return value is the full node instance, which may be nil if the
// node is running as a light client.
func RegisterEthService(stack *node.Node, cfg *ethconfig.Config) (ethapi.Backend, *eth.Ethereum) {
func RegisterEthService(stack *node.Node, cfg *ethconfig.Config) (quaiapi.Backend, *eth.Ethereum) {
backend, err := eth.New(stack, cfg)
if err != nil {
Fatalf("Failed to register the Ethereum service: %v", err)
Expand All @@ -1490,7 +1490,7 @@ func RegisterEthService(stack *node.Node, cfg *ethconfig.Config) (ethapi.Backend

// RegisterEthStatsService configures the Ethereum Stats daemon and adds it to
// the given node.
func RegisterEthStatsService(stack *node.Node, backend ethapi.Backend, url string) {
func RegisterEthStatsService(stack *node.Node, backend quaiapi.Backend, url string) {
if err := ethstats.New(stack, backend, backend.Engine(), url); err != nil {
Fatalf("Failed to register the Ethereum Stats service: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/dominant-strategies/go-quai/core/rawdb"
"github.com/dominant-strategies/go-quai/core/state"
"github.com/dominant-strategies/go-quai/core/types"
"github.com/dominant-strategies/go-quai/internal/ethapi"
"github.com/dominant-strategies/go-quai/internal/quaiapi"
"github.com/dominant-strategies/go-quai/rlp"
"github.com/dominant-strategies/go-quai/rpc"
"github.com/dominant-strategies/go-quai/trie"
Expand Down Expand Up @@ -341,7 +341,7 @@ func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([]*BadBlockArgs,
} else {
blockRlp = fmt.Sprintf("0x%x", rlpBytes)
}
if blockJSON, err = ethapi.RPCMarshalBlock(block, true, true); err != nil {
if blockJSON, err = quaiapi.RPCMarshalBlock(block, true, true); err != nil {
blockJSON = map[string]interface{}{"error": err.Error()}
}
results = append(results, &BadBlockArgs{
Expand Down
Loading

0 comments on commit e7b7150

Please sign in to comment.