diff --git a/core/store/ledgerstore/ledger_store.go b/core/store/ledgerstore/ledger_store.go index 33c583e9a..a2fdaede7 100644 --- a/core/store/ledgerstore/ledger_store.go +++ b/core/store/ledgerstore/ledger_store.go @@ -36,7 +36,6 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology/common" "github.com/ontio/ontology/common/config" - sysconfig "github.com/ontio/ontology/common/config" "github.com/ontio/ontology/common/log" vconfig "github.com/ontio/ontology/consensus/vbft/config" "github.com/ontio/ontology/core/payload" @@ -1462,7 +1461,7 @@ func (this *LedgerStoreImp) PreExecuteEip155Tx(msg types3.Message) (*types5.Exec Height: height, Timestamp: blockTime, } - config := params.GetChainConfig(sysconfig.DefConfig.P2PNode.EVMChainId) + config := params.GetChainConfig(config.DefConfig.P2PNode.EVMChainId) txContext := evm.NewEVMTxContext(msg) blockContext := evm.NewEVMBlockContext(height, blockTime, this) cache := this.GetCacheDB() diff --git a/http/ethrpc/eth/api.go b/http/ethrpc/eth/api.go index ddbd1c43e..753f546d2 100644 --- a/http/ethrpc/eth/api.go +++ b/http/ethrpc/eth/api.go @@ -35,7 +35,6 @@ import ( "github.com/ontio/ontology/common/constants" "github.com/ontio/ontology/common/log" "github.com/ontio/ontology/core/states" - common2 "github.com/ontio/ontology/core/store/common" sCom "github.com/ontio/ontology/core/store/common" otypes "github.com/ontio/ontology/core/types" ontErrors "github.com/ontio/ontology/errors" @@ -443,7 +442,7 @@ func (api *EthereumAPI) GetTransactionByHash(hash common.Hash) (*types2.Transact log.Debugf("eth_getTransactionByHash hash %v", hash.Hex()) height, tx, err := bactor.GetTxnWithHeightByTxHash(oComm.Uint256(hash)) if err != nil { - if err == common2.ErrNotFound { + if err == sCom.ErrNotFound { return nil, nil } return nil, err diff --git a/p2pserver/mock/discovery_test.go b/p2pserver/mock/discovery_test.go index 8727f25a3..dbe246e3c 100644 --- a/p2pserver/mock/discovery_test.go +++ b/p2pserver/mock/discovery_test.go @@ -24,7 +24,6 @@ import ( "github.com/ontio/ontology/common/log" "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" msgTypes "github.com/ontio/ontology/p2pserver/message/types" "github.com/ontio/ontology/p2pserver/net/netserver" p2p "github.com/ontio/ontology/p2pserver/net/protocol" @@ -82,7 +81,7 @@ func (self *DiscoveryProtocol) HandleSystemMessage(net p2p.P2P, msg p2p.SystemMe func (self *DiscoveryProtocol) HandlePeerMessage(ctx *p2p.Context, msg msgTypes.Message) { log.Trace("[p2p]receive message", ctx.Sender().GetAddr(), ctx.Sender().GetID()) switch m := msg.(type) { - case *types.AddrReq: + case *msgTypes.AddrReq: self.discovery.AddrReqHandle(ctx) case *msgTypes.FindNodeResp: self.discovery.FindNodeResponseHandle(ctx, m)