Skip to content

Commit

Permalink
chore: pkg import only once
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill committed Oct 19, 2023
1 parent c52459e commit 1139f7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions core/store/ledgerstore/ledger_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions http/ethrpc/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions p2pserver/mock/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1139f7c

Please sign in to comment.