forked from cerc-io/ipld-eth-server
Refactor to use plugeth-statediff (#1)
Reviewed-on: cerc-io/ipld-eth-server#1
This commit is contained in:
+2
-1
@@ -17,8 +17,8 @@
|
||||
package serve
|
||||
|
||||
import (
|
||||
"github.com/cerc-io/plugeth-statediff/types"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/ethereum/go-ethereum/statediff/types"
|
||||
)
|
||||
|
||||
// APIName is the namespace used for the state diffing service API
|
||||
@@ -45,6 +45,7 @@ func NewPublicServerAPI(w Server, client *rpc.Client) *PublicServerAPI {
|
||||
func (api *PublicServerAPI) WatchAddress(operation types.OperationType, args []types.WatchAddressArg) error {
|
||||
err := api.rpc.Call(nil, "statediff_watchAddress", operation, args)
|
||||
if err != nil {
|
||||
// Return the error directly to match the native Geth API
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -24,12 +24,12 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/cerc-io/plugeth-statediff/indexer/database/sql/postgres"
|
||||
"github.com/cerc-io/plugeth-statediff/indexer/node"
|
||||
"github.com/cerc-io/plugeth-statediff/utils"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/ethereum/go-ethereum/statediff"
|
||||
"github.com/ethereum/go-ethereum/statediff/indexer/database/sql/postgres"
|
||||
"github.com/ethereum/go-ethereum/statediff/indexer/node"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@@ -239,9 +239,9 @@ func NewConfig() (*Config, error) {
|
||||
}
|
||||
chainConfigPath := viper.GetString("ethereum.chainConfig")
|
||||
if chainConfigPath != "" {
|
||||
c.ChainConfig, err = statediff.LoadConfig(chainConfigPath)
|
||||
c.ChainConfig, err = utils.LoadConfig(chainConfigPath)
|
||||
} else {
|
||||
c.ChainConfig, err = statediff.ChainConfig(nodeInfo.ChainID)
|
||||
c.ChainConfig, err = utils.ChainConfig(nodeInfo.ChainID)
|
||||
}
|
||||
|
||||
c.loadGroupCacheConfig()
|
||||
|
||||
Reference in New Issue
Block a user