From d2a10512c153bef455fed19f4b7b8cde51b78784 Mon Sep 17 00:00:00 2001 From: JunXi Xie Date: Sun, 5 Jul 2020 22:12:03 +0800 Subject: [PATCH] support v2 version in go mod --- .travis.script.bash | 4 +- Makefile | 2 +- account/account.go | 6 +-- account/account_test.go | 2 +- account/client.go | 4 +- account/file_store.go | 2 +- account/file_store_test.go | 2 +- account/identity.go | 2 +- account/store.go | 2 +- cmd-tools/sigsvr/sigsvr.go | 16 +++--- cmd/abi/abi_mgr.go | 2 +- cmd/account.go | 6 +-- cmd/account_cmd.go | 10 ++-- cmd/asset_cmd.go | 10 ++-- cmd/common/common.go | 10 ++-- cmd/config.go | 10 ++-- cmd/contract_cmd.go | 12 ++--- cmd/export_cmd.go | 4 +- cmd/import_cmd.go | 16 +++--- cmd/info_cmd.go | 6 +-- cmd/sig_tx_cmd.go | 10 ++-- cmd/sigsvr/common/common.go | 4 +- cmd/sigsvr/handler.go | 2 +- cmd/sigsvr/handlers/create_account.go | 4 +- cmd/sigsvr/handlers/create_account_test.go | 2 +- cmd/sigsvr/handlers/export_account.go | 8 +-- cmd/sigsvr/handlers/export_account_test.go | 4 +- cmd/sigsvr/handlers/sig_data.go | 6 +-- cmd/sigsvr/handlers/sig_data_test.go | 2 +- cmd/sigsvr/handlers/sig_mutil_raw_tx.go | 12 ++--- cmd/sigsvr/handlers/sig_mutil_raw_tx_test.go | 8 +-- cmd/sigsvr/handlers/sig_native_invoke_tx.go | 10 ++-- .../handlers/sig_native_invoke_tx_test.go | 6 +-- cmd/sigsvr/handlers/sig_neovm_invoke_tx.go | 10 ++-- .../handlers/sig_neovm_invoke_tx_abi.go | 10 ++-- .../handlers/sig_neovm_invoke_tx_abi_test.go | 2 +- .../handlers/sig_neovm_invoke_tx_test.go | 4 +- cmd/sigsvr/handlers/sig_raw_tx.go | 10 ++-- cmd/sigsvr/handlers/sig_raw_tx_test.go | 12 ++--- cmd/sigsvr/handlers/sig_transfer_tx.go | 8 +-- cmd/sigsvr/handlers/sig_transfer_tx_test.go | 4 +- cmd/sigsvr/httpsvr.go | 4 +- cmd/sigsvr/import_wallet.go | 10 ++-- cmd/sigsvr/store/wallet_store.go | 4 +- cmd/tx_cmd.go | 8 +-- cmd/usage.go | 2 +- cmd/utils/export.go | 2 +- cmd/utils/flags.go | 6 +-- cmd/utils/native_param.go | 12 ++--- cmd/utils/native_param_test.go | 6 +-- cmd/utils/neovm_param_abi.go | 2 +- cmd/utils/ont.go | 24 ++++----- cmd/utils/params.go | 4 +- cmd/utils/rpc.go | 4 +- cmd/utils/utils.go | 2 +- common/config/config.go | 8 +-- common/zero_copy_sink_test.go | 2 +- common/zero_copy_source_test.go | 2 +- consensus/actor/actor.go | 6 +-- consensus/actor/message.go | 2 +- consensus/consensus.go | 12 ++--- consensus/dbft/block_signatures.go | 2 +- consensus/dbft/change_view.go | 2 +- consensus/dbft/consensus_context.go | 14 ++--- consensus/dbft/consensus_message.go | 4 +- consensus/dbft/dbft_service.go | 32 ++++++------ consensus/dbft/prepare_request.go | 6 +-- consensus/dbft/prepare_response.go | 2 +- consensus/solo/solo.go | 22 ++++---- consensus/vbft/block_pool.go | 6 +-- consensus/vbft/block_pool_test.go | 10 ++-- consensus/vbft/chain_store.go | 14 ++--- consensus/vbft/chain_store_test.go | 12 ++--- consensus/vbft/config/config.go | 2 +- consensus/vbft/config/genesis.go | 6 +-- consensus/vbft/config/genesis_test.go | 6 +-- consensus/vbft/config/types.go | 2 +- consensus/vbft/event_timer.go | 2 +- consensus/vbft/msg_builder.go | 12 ++--- consensus/vbft/msg_builder_test.go | 2 +- consensus/vbft/msg_pool.go | 2 +- consensus/vbft/msg_types.go | 6 +-- consensus/vbft/msg_types_test.go | 10 ++-- consensus/vbft/node_sync.go | 6 +-- consensus/vbft/node_utils.go | 12 ++--- consensus/vbft/node_utils_test.go | 6 +-- consensus/vbft/peer_pool.go | 4 +- consensus/vbft/peer_pool_test.go | 4 +- consensus/vbft/service.go | 34 ++++++------ consensus/vbft/state_mgmt.go | 2 +- consensus/vbft/state_mgmt_test.go | 2 +- consensus/vbft/types.go | 6 +-- consensus/vbft/types_test.go | 6 +-- consensus/vbft/utils.go | 22 ++++---- consensus/vbft/utils_test.go | 4 +- core/genesis/genesis.go | 24 ++++----- core/genesis/genesis_test.go | 6 +-- core/ledger/ledger.go | 18 +++---- core/payload/bookkeeper.go | 2 +- core/payload/bookkeeper_test.go | 2 +- core/payload/deploy_code.go | 4 +- core/payload/deploy_code_test.go | 2 +- core/payload/invoke_code.go | 2 +- core/payload/invoke_code_test.go | 2 +- core/program/program.go | 6 +-- core/states/bookkeeper.go | 2 +- core/states/bookkeeper_test.go | 2 +- core/states/state_base.go | 2 +- core/states/state_base_test.go | 2 +- core/states/storage_item.go | 4 +- core/states/storage_item_test.go | 2 +- core/states/storage_key.go | 2 +- core/states/storage_key_test.go | 2 +- core/states/validator_state.go | 4 +- core/states/validator_state_test.go | 2 +- core/states/vote_state.go | 2 +- core/states/vote_state_test.go | 2 +- core/store/common/store.go | 4 +- core/store/ledgerstore/block_cache.go | 4 +- core/store/ledgerstore/block_store.go | 10 ++-- core/store/ledgerstore/block_store_test.go | 14 ++--- core/store/ledgerstore/cross_chain_store.go | 8 +-- core/store/ledgerstore/event_store.go | 12 ++--- core/store/ledgerstore/ledger_store.go | 46 ++++++++-------- core/store/ledgerstore/ledger_store_test.go | 8 +-- core/store/ledgerstore/state_store.go | 22 ++++---- core/store/ledgerstore/state_store_test.go | 4 +- core/store/ledgerstore/tx_handler.go | 36 ++++++------- core/store/leveldbstore/leveldb_store.go | 2 +- core/store/overlaydb/iterator.go | 2 +- core/store/overlaydb/overlaydb.go | 4 +- core/store/overlaydb/overlaydb_test.go | 2 +- core/store/store.go | 14 ++--- core/tests/signature_test.go | 4 +- core/types/address.go | 6 +-- core/types/block.go | 2 +- core/types/cross_state.go | 2 +- core/types/cross_state_test.go | 2 +- core/types/header.go | 2 +- core/types/header_test.go | 2 +- core/types/mutable_transaction.go | 4 +- core/types/smartcontract.go | 2 +- core/types/transaction.go | 8 +-- core/types/transaction_attribute.go | 2 +- core/utils/transaction_builder.go | 10 ++-- core/validation/block_validator.go | 8 +-- core/validation/transaction_validator.go | 20 +++---- core/vote/validator.go | 4 +- events/message/message.go | 2 +- go.mod | 2 +- http/base/actor/consensus.go | 2 +- http/base/actor/event.go | 4 +- http/base/actor/ledger.go | 12 ++--- http/base/actor/net_server.go | 4 +- http/base/actor/txnpool.go | 10 ++-- http/base/actor/utils.go | 4 +- http/base/common/common.go | 30 +++++------ http/base/common/payload_to_hex.go | 6 +-- http/base/error/error.go | 2 +- http/base/rest/interfaces.go | 20 +++---- http/base/rpc/interfaces.go | 22 ++++---- http/base/rpc/local_interfaces.go | 8 +-- http/base/rpc/result.go | 2 +- http/base/rpc/rpc.go | 6 +-- http/jsonrpc/rpc_server.go | 6 +-- http/localrpc/local_server.go | 6 +-- http/nodeinfo/prom.go | 10 ++-- http/nodeinfo/server.go | 6 +-- http/restful/restful/server.go | 10 ++-- http/restful/server.go | 2 +- http/test/func_test.go | 8 +-- http/websocket/server.go | 22 ++++---- http/websocket/session/session.go | 2 +- http/websocket/websocket/server.go | 12 ++--- main.go | 52 +++++++++---------- merkle/file_hash_store.go | 2 +- merkle/merkle_hasher.go | 2 +- merkle/merkle_tree.go | 4 +- merkle/merkle_tree_test.go | 2 +- p2pserver/actor/req/txnpool.go | 6 +-- p2pserver/common/id.go | 6 +-- p2pserver/common/logger.go | 2 +- .../connect_controller/connect_controller.go | 6 +-- .../connect_controller_test.go | 6 +-- p2pserver/connect_controller/connection.go | 2 +- .../connect_controller/control_option.go | 4 +- p2pserver/connect_controller/transport.go | 4 +- p2pserver/dht/dht.go | 6 +-- p2pserver/dht/dht_test.go | 2 +- p2pserver/dht/kbucket/bucket.go | 2 +- p2pserver/dht/kbucket/sorting.go | 2 +- p2pserver/dht/kbucket/table.go | 2 +- p2pserver/dht/kbucket/table_test.go | 2 +- p2pserver/handshake/handshake.go | 8 +-- p2pserver/handshake/handshake_test.go | 6 +-- p2pserver/link/link.go | 8 +-- p2pserver/link/link_test.go | 10 ++-- p2pserver/message/msg_pack/msg_pack.go | 10 ++-- p2pserver/message/types/address.go | 4 +- p2pserver/message/types/address_req.go | 4 +- p2pserver/message/types/address_test.go | 4 +- p2pserver/message/types/block.go | 6 +-- p2pserver/message/types/block_header.go | 6 +-- p2pserver/message/types/block_headers_req.go | 4 +- .../message/types/block_headers_req_test.go | 2 +- p2pserver/message/types/blocks_req.go | 4 +- p2pserver/message/types/blocks_req_test.go | 2 +- p2pserver/message/types/consensus.go | 4 +- p2pserver/message/types/consensus_payload.go | 8 +-- p2pserver/message/types/data_req.go | 4 +- p2pserver/message/types/data_req_test.go | 2 +- p2pserver/message/types/find_node.go | 4 +- p2pserver/message/types/find_node_test.go | 2 +- p2pserver/message/types/inventory.go | 4 +- p2pserver/message/types/message.go | 6 +-- p2pserver/message/types/message_test.go | 4 +- p2pserver/message/types/notfound.go | 4 +- p2pserver/message/types/notfound_test.go | 2 +- p2pserver/message/types/ping.go | 4 +- p2pserver/message/types/pong.go | 4 +- p2pserver/message/types/subnet.go | 8 +-- p2pserver/message/types/transaction.go | 6 +-- p2pserver/message/types/update_kadid.go | 4 +- p2pserver/message/types/verack.go | 4 +- p2pserver/message/types/version.go | 4 +- p2pserver/mock/dialer.go | 4 +- p2pserver/mock/discovery_test.go | 20 +++---- p2pserver/mock/interface.go | 10 ++-- p2pserver/mock/listener.go | 2 +- p2pserver/mock/mocknet.go | 2 +- p2pserver/mock/mocknet_test.go | 2 +- p2pserver/mock/reserved_test.go | 10 ++-- p2pserver/mock/subnet_test.go | 26 +++++----- p2pserver/net/netserver/nbr_peers.go | 8 +-- p2pserver/net/netserver/netserver.go | 16 +++--- p2pserver/net/protocol/protocol.go | 4 +- p2pserver/net/protocol/server.go | 6 +-- p2pserver/p2pserver.go | 20 +++---- p2pserver/peer/peer.go | 10 ++-- p2pserver/protocols/block_sync/block_sync.go | 16 +++--- p2pserver/protocols/bootstrap/bootstrap.go | 12 ++--- p2pserver/protocols/discovery/discovery.go | 14 ++--- p2pserver/protocols/heatbeat/heartbeat.go | 14 ++--- p2pserver/protocols/msg_handler.go | 38 +++++++------- .../protocols/recent_peers/recent_peers.go | 10 ++-- p2pserver/protocols/reconnect/reconnect.go | 10 ++-- p2pserver/protocols/subnet/subnet.go | 14 ++--- p2pserver/protocols/utils/govnode_resolver.go | 14 ++--- smartcontract/context/context.go | 6 +-- smartcontract/event/event.go | 8 +-- smartcontract/event/log_event_args.go | 2 +- smartcontract/event/notify_event_args.go | 2 +- smartcontract/service/native/auth/auth.go | 10 ++-- smartcontract/service/native/auth/param.go | 4 +- .../service/native/auth/param_test.go | 4 +- smartcontract/service/native/auth/state.go | 4 +- .../service/native/auth/state_test.go | 2 +- smartcontract/service/native/auth/utils.go | 8 +-- .../native/cross_chain/common/common.go | 14 ++--- .../native/cross_chain/common/header.go | 2 +- .../native/cross_chain/common/states.go | 2 +- .../cross_chain_manager/cross_chain.go | 12 ++--- .../cross_chain/cross_chain_manager/param.go | 4 +- .../test/cross_chain_test.go | 38 +++++++------- .../cross_chain_manager/test/param_test.go | 4 +- .../cross_chain/cross_chain_manager/utils.go | 16 +++--- .../cross_chain/header_sync/header_sync.go | 10 ++-- .../native/cross_chain/header_sync/param.go | 4 +- .../native/cross_chain/header_sync/states.go | 4 +- .../header_sync/test/header_sync_test.go | 30 +++++------ .../header_sync/test/param_test.go | 4 +- .../header_sync/test/states_test.go | 4 +- .../native/cross_chain/header_sync/utils.go | 18 +++---- .../cross_chain/lock_proxy/lock_proxy.go | 20 +++---- .../native/cross_chain/lock_proxy/states.go | 4 +- .../cross_chain/lock_proxy/states_test.go | 6 +-- .../native/cross_chain/lock_proxy/utils.go | 14 ++--- .../native/global_params/global_params.go | 8 +-- .../native/global_params/param_test.go | 2 +- .../service/native/global_params/states.go | 6 +-- .../service/native/global_params/utils.go | 12 ++--- .../service/native/governance/governance.go | 16 +++--- .../service/native/governance/method.go | 12 ++--- .../service/native/governance/param.go | 4 +- .../service/native/governance/states.go | 6 +-- .../service/native/governance/utils.go | 18 +++---- smartcontract/service/native/init/init.go | 28 +++++----- .../service/native/native_service.go | 20 +++---- smartcontract/service/native/ong/ong.go | 12 ++--- smartcontract/service/native/ont/ont.go | 18 +++---- smartcontract/service/native/ont/states.go | 4 +- .../service/native/ont/states_test.go | 2 +- smartcontract/service/native/ont/utils.go | 16 +++--- smartcontract/service/native/ontfs/app_sdk.go | 10 ++-- smartcontract/service/native/ontfs/errors.go | 10 ++-- .../service/native/ontfs/file_challenge.go | 6 +-- .../service/native/ontfs/file_del.go | 4 +- .../service/native/ontfs/file_get_pledge.go | 4 +- .../service/native/ontfs/file_info.go | 6 +-- .../service/native/ontfs/file_pdp_data.go | 6 +-- .../service/native/ontfs/file_pdp_record.go | 8 +-- .../service/native/ontfs/file_read_pledge.go | 8 +-- .../native/ontfs/file_read_settle_slice.go | 4 +- .../service/native/ontfs/file_renew.go | 4 +- .../service/native/ontfs/file_transfer.go | 6 +-- .../service/native/ontfs/global_param.go | 8 +-- smartcontract/service/native/ontfs/init.go | 8 +-- .../service/native/ontfs/node_business.go | 14 ++--- .../service/native/ontfs/node_govern.go | 10 ++-- .../service/native/ontfs/node_info.go | 8 +-- .../service/native/ontfs/node_info_test.go | 2 +- .../service/native/ontfs/node_list_sort.go | 2 +- .../service/native/ontfs/passport.go | 6 +-- .../native/ontfs/pdp/merkle_pdp/merkle_pdp.go | 2 +- .../ontfs/pdp/merkle_pdp/merkle_pdp_test.go | 2 +- smartcontract/service/native/ontfs/pdp/pdp.go | 4 +- .../service/native/ontfs/pdp/pdp_test.go | 2 +- .../service/native/ontfs/result_info.go | 2 +- .../service/native/ontfs/space_info.go | 6 +-- .../service/native/ontfs/space_update.go | 4 +- smartcontract/service/native/ontfs/utils.go | 12 ++--- .../service/native/ontid/attribute.go | 6 +-- .../service/native/ontid/attribute_test.go | 8 +-- .../service/native/ontid/authentication.go | 6 +-- .../native/ontid/authentication_test.go | 6 +-- smartcontract/service/native/ontid/context.go | 8 +-- .../service/native/ontid/context_test.go | 6 +-- .../service/native/ontid/controller.go | 8 +-- .../service/native/ontid/controller_test.go | 8 +-- smartcontract/service/native/ontid/event.go | 6 +-- smartcontract/service/native/ontid/group.go | 6 +-- .../service/native/ontid/group_test.go | 16 +++--- smartcontract/service/native/ontid/init.go | 6 +-- smartcontract/service/native/ontid/method.go | 12 ++--- .../service/native/ontid/ontid_test.go | 12 ++--- smartcontract/service/native/ontid/owner.go | 12 ++--- smartcontract/service/native/ontid/param.go | 6 +-- smartcontract/service/native/ontid/proof.go | 6 +-- smartcontract/service/native/ontid/query.go | 8 +-- .../service/native/ontid/query_test.go | 2 +- .../service/native/ontid/recovery.go | 8 +-- .../service/native/ontid/recovery_test.go | 8 +-- smartcontract/service/native/ontid/service.go | 10 ++-- .../service/native/ontid/service_test.go | 6 +-- smartcontract/service/native/ontid/time.go | 10 ++-- smartcontract/service/native/ontid/utils.go | 12 ++--- .../service/native/testsuite/fakedb.go | 4 +- .../service/native/testsuite/ont_suite.go | 14 ++--- .../native/testsuite/ont_suite_test.go | 18 +++---- .../service/native/utils/linked_list.go | 8 +-- .../service/native/utils/operation.go | 8 +-- smartcontract/service/native/utils/params.go | 2 +- .../service/native/utils/params_test.go | 2 +- .../service/native/utils/serialization.go | 2 +- smartcontract/service/native/utils/store.go | 10 ++-- .../service/native/utils/unbind_ong.go | 4 +- .../service/native/utils/unbind_ong_test.go | 4 +- smartcontract/service/neovm/attribute.go | 8 +-- smartcontract/service/neovm/block.go | 8 +-- smartcontract/service/neovm/blockchain.go | 6 +-- smartcontract/service/neovm/config.go | 2 +- smartcontract/service/neovm/contract.go | 8 +-- smartcontract/service/neovm/deprecated.go | 8 +-- smartcontract/service/neovm/gas_cost.go | 4 +- smartcontract/service/neovm/header.go | 8 +-- smartcontract/service/neovm/native.go | 8 +-- smartcontract/service/neovm/neovm_service.go | 22 ++++---- smartcontract/service/neovm/runtime.go | 16 +++--- smartcontract/service/neovm/storage.go | 8 +-- .../service/neovm/storage_context.go | 4 +- smartcontract/service/neovm/system.go | 4 +- smartcontract/service/neovm/transaction.go | 6 +-- smartcontract/service/neovm/wasmvm.go | 12 ++--- smartcontract/service/util/util.go | 12 ++--- smartcontract/service/wasmvm/contract.go | 8 +-- smartcontract/service/wasmvm/runtime.go | 24 ++++----- smartcontract/service/wasmvm/storage.go | 2 +- smartcontract/service/wasmvm/utils.go | 2 +- smartcontract/service/wasmvm/wasm_service.go | 16 +++--- .../service/wasmvm/wasmjit_runtime.go | 10 ++-- smartcontract/smart_contract.go | 22 ++++---- smartcontract/states/contract.go | 4 +- smartcontract/states/contract_test.go | 2 +- smartcontract/states/wasmContract.go | 2 +- smartcontract/storage/cachedb.go | 8 +-- smartcontract/storage/cachedb_test.go | 6 +-- smartcontract/test/append_test.go | 8 +-- smartcontract/test/common_test.go | 8 +-- .../test/equal_stack_overflow_test.go | 8 +-- smartcontract/test/infinite_loop_test.go | 4 +- smartcontract/test/map_test.go | 6 +-- smartcontract/test/native_test.go | 6 +-- .../test/neovm_feature_check_test.go | 10 ++-- smartcontract/test/pack_test.go | 6 +-- smartcontract/test/panic_test.go | 12 ++--- smartcontract/test/preexecutedeploy_test.go | 8 +-- smartcontract/test/verifysig_test.go | 14 ++--- txnpool/common/transaction_pool.go | 12 ++--- txnpool/common/transaction_pool_test.go | 6 +-- txnpool/common/txnpool_common.go | 6 +-- txnpool/proc/txnpool_actor.go | 24 ++++----- txnpool/proc/txnpool_actor_test.go | 18 +++---- txnpool/proc/txnpool_server.go | 26 +++++----- txnpool/proc/txnpool_server_test.go | 12 ++--- txnpool/proc/txnpool_worker.go | 12 ++--- txnpool/proc/txnpool_worker_test.go | 10 ++-- txnpool/server.go | 8 +-- txnpool/test/txnpool_test.go | 20 +++---- validator/db/best_block.go | 4 +- validator/db/key_prefix.go | 2 +- validator/db/store.go | 8 +-- validator/db/transaction_provider.go | 4 +- validator/increment/increment.go | 6 +-- validator/stateful/stateful_validator.go | 12 ++--- validator/stateless/stateless_validator.go | 6 +-- .../stateless/stateless_validator_test.go | 16 +++--- validator/types/messages.go | 6 +-- vm/crossvm_codec/codec.go | 4 +- vm/crossvm_codec/codec_test.go | 2 +- vm/crossvm_codec/notify_codec.go | 4 +- vm/crossvm_codec/vmcall_codec.go | 2 +- vm/neovm/execution_context.go | 2 +- vm/neovm/executor.go | 10 ++-- vm/neovm/executor_test.go | 2 +- vm/neovm/int_value_test.go | 4 +- vm/neovm/params_builder.go | 2 +- vm/neovm/stack_opcode_test.go | 4 +- vm/neovm/types/array_value.go | 4 +- vm/neovm/types/int_value.go | 6 +-- vm/neovm/types/interop_value.go | 2 +- vm/neovm/types/neovm_value.go | 10 ++-- vm/neovm/types/neovm_value_test.go | 2 +- vm/neovm/types/struct_value.go | 4 +- vm/neovm/value_stack.go | 4 +- vm/neovm/value_stack_conversion.go | 4 +- vm/neovm/value_stack_test.go | 2 +- wasmtest/common/common.go | 18 +++---- wasmtest/common/common_test.go | 2 +- wasmtest/wasm-test.go | 38 +++++++------- 439 files changed, 1695 insertions(+), 1695 deletions(-) diff --git a/.travis.script.bash b/.travis.script.bash index d727a23a48..2870fb3cab 100755 --- a/.travis.script.bash +++ b/.travis.script.bash @@ -17,6 +17,6 @@ elif [ $TRAVIS_OS_NAME == 'osx' ]; then env GO111MODULE=on make all else echo "win sys" - env GO111MODULE=on CGO_ENABLED=1 go build -ldflags "-X github.com/ontio/ontology/common/config.Version=${VERSION}" -o ontology-windows-amd64 main.go - env GO111MODULE=on go build -ldflags "-X github.com/ontio/ontology/common/config.Version=${VERSION}" -o sigsvr-windows-amd64 sigsvr.go + env GO111MODULE=on CGO_ENABLED=1 go build -ldflags "-X github.com/ontio/ontology/v2/common/config.Version=${VERSION}" -o ontology-windows-amd64 main.go + env GO111MODULE=on go build -ldflags "-X github.com/ontio/ontology/v2/common/config.Version=${VERSION}" -o sigsvr-windows-amd64 sigsvr.go fi diff --git a/Makefile b/Makefile index 440004d985..ed421873ed 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GOFMT=gofmt GC=go build VERSION := $(shell git describe --always --tags --long) -BUILD_NODE_PAR = -ldflags "-w -X github.com/ontio/ontology/common/config.Version=$(VERSION)" #-race +BUILD_NODE_PAR = -ldflags "-w -X github.com/ontio/ontology/v2/common/config.Version=$(VERSION)" #-race ARCH=$(shell uname -m) DBUILD=docker build diff --git a/account/account.go b/account/account.go index b371d71f28..5a35f8c746 100644 --- a/account/account.go +++ b/account/account.go @@ -21,9 +21,9 @@ package account import ( "github.com/ontio/ontology-crypto/keypair" s "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" ) /* crypto object */ diff --git a/account/account_test.go b/account/account_test.go index 435c2a384f..527092c02e 100644 --- a/account/account_test.go +++ b/account/account_test.go @@ -21,7 +21,7 @@ import ( "os" "testing" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/core/types" "github.com/stretchr/testify/assert" ) diff --git a/account/client.go b/account/client.go index 22b252ea85..e45b924972 100644 --- a/account/client.go +++ b/account/client.go @@ -28,8 +28,8 @@ import ( "github.com/ontio/ontology-crypto/keypair" s "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" ) //Client of wallet diff --git a/account/file_store.go b/account/file_store.go index 0454c58a84..3b37b05f55 100644 --- a/account/file_store.go +++ b/account/file_store.go @@ -26,7 +26,7 @@ import ( "os" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) /** AccountData - for wallet read and save, no crypto object included **/ diff --git a/account/file_store_test.go b/account/file_store_test.go index e527a5ad76..57804b7322 100644 --- a/account/file_store_test.go +++ b/account/file_store_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/core/types" "github.com/stretchr/testify/assert" ) diff --git a/account/identity.go b/account/identity.go index 75a8f8f809..1b47e43d4e 100644 --- a/account/identity.go +++ b/account/identity.go @@ -28,7 +28,7 @@ import ( "github.com/itchyny/base58-go" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/core/types" "golang.org/x/crypto/ripemd160" ) diff --git a/account/store.go b/account/store.go index 9ed95cd82e..df9608f05a 100644 --- a/account/store.go +++ b/account/store.go @@ -19,7 +19,7 @@ package account import ( - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type ClientStore interface { diff --git a/cmd-tools/sigsvr/sigsvr.go b/cmd-tools/sigsvr/sigsvr.go index 535593f54e..78cfe78bc8 100644 --- a/cmd-tools/sigsvr/sigsvr.go +++ b/cmd-tools/sigsvr/sigsvr.go @@ -23,14 +23,14 @@ import ( "runtime" "syscall" - "github.com/ontio/ontology/cmd" - "github.com/ontio/ontology/cmd/abi" - cmdsvr "github.com/ontio/ontology/cmd/sigsvr" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/cmd/sigsvr/store" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/cmd" + "github.com/ontio/ontology/v2/cmd/abi" + cmdsvr "github.com/ontio/ontology/v2/cmd/sigsvr" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/cmd/sigsvr/store" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" "github.com/urfave/cli" ) diff --git a/cmd/abi/abi_mgr.go b/cmd/abi/abi_mgr.go index 799f82a035..93aeddc660 100644 --- a/cmd/abi/abi_mgr.go +++ b/cmd/abi/abi_mgr.go @@ -24,7 +24,7 @@ import ( "io/ioutil" "strings" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common/log" ) var DefAbiMgr = NewAbiMgr() diff --git a/cmd/account.go b/cmd/account.go index fac1818216..acb98600fe 100644 --- a/cmd/account.go +++ b/cmd/account.go @@ -25,9 +25,9 @@ import ( "github.com/ontio/ontology-crypto/keypair" s "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common/config" + "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common/config" "github.com/urfave/cli" ) diff --git a/cmd/account_cmd.go b/cmd/account_cmd.go index f4501108e9..264175439c 100644 --- a/cmd/account_cmd.go +++ b/cmd/account_cmd.go @@ -26,11 +26,11 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common/password" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common/password" + "github.com/ontio/ontology/v2/core/types" "github.com/urfave/cli" ) diff --git a/cmd/asset_cmd.go b/cmd/asset_cmd.go index c90552e5e1..16fbbe078b 100644 --- a/cmd/asset_cmd.go +++ b/cmd/asset_cmd.go @@ -23,11 +23,11 @@ import ( "strconv" "strings" - "github.com/ontio/ontology/account" - cmdcom "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common/config" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + cmdcom "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common/config" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" "github.com/urfave/cli" ) diff --git a/cmd/common/common.go b/cmd/common/common.go index e3ec6a3f4c..bbb9a3c5ab 100644 --- a/cmd/common/common.go +++ b/cmd/common/common.go @@ -22,11 +22,11 @@ import ( "fmt" "strconv" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/password" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/password" "github.com/urfave/cli" ) diff --git a/cmd/config.go b/cmd/config.go index b53b252323..d1d5a84cd4 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -21,11 +21,11 @@ package cmd import ( "fmt" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/smartcontract/service/native/governance" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/smartcontract/service/native/governance" "github.com/urfave/cli" ) diff --git a/cmd/contract_cmd.go b/cmd/contract_cmd.go index 03a8d483ea..edbabffadf 100644 --- a/cmd/contract_cmd.go +++ b/cmd/contract_cmd.go @@ -24,12 +24,12 @@ import ( "io/ioutil" "strings" - cmdcom "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/payload" - httpcom "github.com/ontio/ontology/http/base/common" + cmdcom "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/payload" + httpcom "github.com/ontio/ontology/v2/http/base/common" "github.com/urfave/cli" ) diff --git a/cmd/export_cmd.go b/cmd/export_cmd.go index 83f05e534e..2235b84eb5 100644 --- a/cmd/export_cmd.go +++ b/cmd/export_cmd.go @@ -27,8 +27,8 @@ import ( "github.com/gosuri/uiprogress" "github.com/urfave/cli" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common/serialization" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common/serialization" ) var ExportCommand = cli.Command{ diff --git a/cmd/import_cmd.go b/cmd/import_cmd.go index 35d8f94548..9de02328a2 100644 --- a/cmd/import_cmd.go +++ b/cmd/import_cmd.go @@ -27,14 +27,14 @@ import ( "github.com/gosuri/uiprogress" "github.com/urfave/cli" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/common/serialization" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/common/serialization" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/types" ) var ImportCommand = cli.Command{ diff --git a/cmd/info_cmd.go b/cmd/info_cmd.go index 9d40b5b967..cee3a4659e 100644 --- a/cmd/info_cmd.go +++ b/cmd/info_cmd.go @@ -23,9 +23,9 @@ import ( "fmt" "strconv" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/core/types" - httpcom "github.com/ontio/ontology/http/base/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/core/types" + httpcom "github.com/ontio/ontology/v2/http/base/common" "github.com/urfave/cli" ) diff --git a/cmd/sig_tx_cmd.go b/cmd/sig_tx_cmd.go index b8ea22eb8c..3db40fbaf8 100644 --- a/cmd/sig_tx_cmd.go +++ b/cmd/sig_tx_cmd.go @@ -23,11 +23,11 @@ import ( "strings" "github.com/ontio/ontology-crypto/keypair" - cmdcom "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/core/types" + cmdcom "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/core/types" "github.com/urfave/cli" ) diff --git a/cmd/sigsvr/common/common.go b/cmd/sigsvr/common/common.go index 4ed271b632..e2af808429 100644 --- a/cmd/sigsvr/common/common.go +++ b/cmd/sigsvr/common/common.go @@ -22,8 +22,8 @@ import ( "encoding/json" "fmt" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd/sigsvr/store" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd/sigsvr/store" ) var DefWalletStore *store.WalletStore diff --git a/cmd/sigsvr/handler.go b/cmd/sigsvr/handler.go index c814f3aca6..cfb26bb0f0 100644 --- a/cmd/sigsvr/handler.go +++ b/cmd/sigsvr/handler.go @@ -18,7 +18,7 @@ package sigsvr -import "github.com/ontio/ontology/cmd/sigsvr/handlers" +import "github.com/ontio/ontology/v2/cmd/sigsvr/handlers" func init() { DefCliRpcSvr.RegHandler("createaccount", handlers.CreateAccount) diff --git a/cmd/sigsvr/handlers/create_account.go b/cmd/sigsvr/handlers/create_account.go index b27a25d645..f97e7bccc9 100644 --- a/cmd/sigsvr/handlers/create_account.go +++ b/cmd/sigsvr/handlers/create_account.go @@ -22,8 +22,8 @@ import ( "github.com/ontio/ontology-crypto/keypair" s "github.com/ontio/ontology-crypto/signature" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/common/log" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/common/log" ) type CreateAccountReq struct { diff --git a/cmd/sigsvr/handlers/create_account_test.go b/cmd/sigsvr/handlers/create_account_test.go index 25fdfcae2c..a362d2d7c1 100644 --- a/cmd/sigsvr/handlers/create_account_test.go +++ b/cmd/sigsvr/handlers/create_account_test.go @@ -20,7 +20,7 @@ package handlers import ( "testing" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" ) func TestCreateAccount(t *testing.T) { diff --git a/cmd/sigsvr/handlers/export_account.go b/cmd/sigsvr/handlers/export_account.go index 45766a3798..efb1e30828 100644 --- a/cmd/sigsvr/handlers/export_account.go +++ b/cmd/sigsvr/handlers/export_account.go @@ -24,10 +24,10 @@ import ( "strings" "time" - "github.com/ontio/ontology/account" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/account" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) type ExportAccountReq struct { diff --git a/cmd/sigsvr/handlers/export_account_test.go b/cmd/sigsvr/handlers/export_account_test.go index b921ea0391..db37e0764a 100644 --- a/cmd/sigsvr/handlers/export_account_test.go +++ b/cmd/sigsvr/handlers/export_account_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/ontio/ontology/account" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/account" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" ) func TestExportWallet(t *testing.T) { diff --git a/cmd/sigsvr/handlers/sig_data.go b/cmd/sigsvr/handlers/sig_data.go index 444eec7b0c..03092b7bb9 100644 --- a/cmd/sigsvr/handlers/sig_data.go +++ b/cmd/sigsvr/handlers/sig_data.go @@ -21,9 +21,9 @@ import ( "encoding/hex" "encoding/json" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common/log" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common/log" ) type SigDataReq struct { diff --git a/cmd/sigsvr/handlers/sig_data_test.go b/cmd/sigsvr/handlers/sig_data_test.go index 980288cfcb..f2c37f7b9f 100644 --- a/cmd/sigsvr/handlers/sig_data_test.go +++ b/cmd/sigsvr/handlers/sig_data_test.go @@ -22,7 +22,7 @@ import ( "encoding/json" "testing" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" ) func TestSigData(t *testing.T) { diff --git a/cmd/sigsvr/handlers/sig_mutil_raw_tx.go b/cmd/sigsvr/handlers/sig_mutil_raw_tx.go index 01eb57a20a..77c790fd4b 100644 --- a/cmd/sigsvr/handlers/sig_mutil_raw_tx.go +++ b/cmd/sigsvr/handlers/sig_mutil_raw_tx.go @@ -23,12 +23,12 @@ import ( "encoding/json" "github.com/ontio/ontology-crypto/keypair" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" ) type SigMutilRawTransactionReq struct { diff --git a/cmd/sigsvr/handlers/sig_mutil_raw_tx_test.go b/cmd/sigsvr/handlers/sig_mutil_raw_tx_test.go index 6d7d397caf..ade7370d00 100644 --- a/cmd/sigsvr/handlers/sig_mutil_raw_tx_test.go +++ b/cmd/sigsvr/handlers/sig_mutil_raw_tx_test.go @@ -24,10 +24,10 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" "github.com/stretchr/testify/assert" ) diff --git a/cmd/sigsvr/handlers/sig_native_invoke_tx.go b/cmd/sigsvr/handlers/sig_native_invoke_tx.go index 9ac86b38f3..e709cd63d8 100644 --- a/cmd/sigsvr/handlers/sig_native_invoke_tx.go +++ b/cmd/sigsvr/handlers/sig_native_invoke_tx.go @@ -22,11 +22,11 @@ import ( "encoding/hex" "encoding/json" - "github.com/ontio/ontology/cmd/abi" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/cmd/abi" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) type SigNativeInvokeTxReq struct { diff --git a/cmd/sigsvr/handlers/sig_native_invoke_tx_test.go b/cmd/sigsvr/handlers/sig_native_invoke_tx_test.go index 07bcc3c56a..a9b9f09019 100644 --- a/cmd/sigsvr/handlers/sig_native_invoke_tx_test.go +++ b/cmd/sigsvr/handlers/sig_native_invoke_tx_test.go @@ -24,9 +24,9 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/cmd/abi" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/cmd/abi" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func TestSigNativeInvokeTx(t *testing.T) { diff --git a/cmd/sigsvr/handlers/sig_neovm_invoke_tx.go b/cmd/sigsvr/handlers/sig_neovm_invoke_tx.go index 300693662c..bd84dc66fc 100644 --- a/cmd/sigsvr/handlers/sig_neovm_invoke_tx.go +++ b/cmd/sigsvr/handlers/sig_neovm_invoke_tx.go @@ -23,11 +23,11 @@ import ( "encoding/json" "fmt" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - httpcom "github.com/ontio/ontology/http/base/common" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + httpcom "github.com/ontio/ontology/v2/http/base/common" ) type SigNeoVMInvokeTxReq struct { diff --git a/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi.go b/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi.go index eb64a21eb1..ff6f10a0e9 100644 --- a/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi.go +++ b/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi.go @@ -21,11 +21,11 @@ import ( "encoding/hex" "encoding/json" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - httpcom "github.com/ontio/ontology/http/base/common" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + httpcom "github.com/ontio/ontology/v2/http/base/common" ) type SigNeoVMInvokeTxAbiReq struct { diff --git a/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi_test.go b/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi_test.go index a5ee4902a5..0272fb397e 100644 --- a/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi_test.go +++ b/cmd/sigsvr/handlers/sig_neovm_invoke_tx_abi_test.go @@ -21,7 +21,7 @@ import ( "encoding/json" "testing" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" ) var testNeovmAbi = `{ diff --git a/cmd/sigsvr/handlers/sig_neovm_invoke_tx_test.go b/cmd/sigsvr/handlers/sig_neovm_invoke_tx_test.go index 53b3d12f72..5542e84f0b 100644 --- a/cmd/sigsvr/handlers/sig_neovm_invoke_tx_test.go +++ b/cmd/sigsvr/handlers/sig_neovm_invoke_tx_test.go @@ -22,8 +22,8 @@ import ( "encoding/json" "testing" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/cmd/utils" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/cmd/utils" ) func TestSigNeoVMInvokeTx(t *testing.T) { diff --git a/cmd/sigsvr/handlers/sig_raw_tx.go b/cmd/sigsvr/handlers/sig_raw_tx.go index f956d6db65..2ec3bbcc49 100644 --- a/cmd/sigsvr/handlers/sig_raw_tx.go +++ b/cmd/sigsvr/handlers/sig_raw_tx.go @@ -23,11 +23,11 @@ import ( "encoding/json" "github.com/ontio/ontology-crypto/keypair" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" ) type SigRawTransactionReq struct { diff --git a/cmd/sigsvr/handlers/sig_raw_tx_test.go b/cmd/sigsvr/handlers/sig_raw_tx_test.go index 8664216dde..b3a2898b3f 100644 --- a/cmd/sigsvr/handlers/sig_raw_tx_test.go +++ b/cmd/sigsvr/handlers/sig_raw_tx_test.go @@ -26,12 +26,12 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/account" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/cmd/sigsvr/store" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/account" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/cmd/sigsvr/store" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" "github.com/stretchr/testify/assert" ) diff --git a/cmd/sigsvr/handlers/sig_transfer_tx.go b/cmd/sigsvr/handlers/sig_transfer_tx.go index 07dc8e6c41..797620c722 100644 --- a/cmd/sigsvr/handlers/sig_transfer_tx.go +++ b/cmd/sigsvr/handlers/sig_transfer_tx.go @@ -23,10 +23,10 @@ import ( "encoding/json" "strconv" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" - cliutil "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" + cliutil "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) type SigTransferTransactionReq struct { diff --git a/cmd/sigsvr/handlers/sig_transfer_tx_test.go b/cmd/sigsvr/handlers/sig_transfer_tx_test.go index d75d9b849e..e505a51b5f 100644 --- a/cmd/sigsvr/handlers/sig_transfer_tx_test.go +++ b/cmd/sigsvr/handlers/sig_transfer_tx_test.go @@ -22,8 +22,8 @@ import ( "encoding/json" "testing" - "github.com/ontio/ontology/account" - clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/account" + clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common" ) func TestSigTransferTransaction(t *testing.T) { diff --git a/cmd/sigsvr/httpsvr.go b/cmd/sigsvr/httpsvr.go index 33bea9f3b4..bd93e27d84 100644 --- a/cmd/sigsvr/httpsvr.go +++ b/cmd/sigsvr/httpsvr.go @@ -24,8 +24,8 @@ import ( "io/ioutil" "net/http" - "github.com/ontio/ontology/cmd/sigsvr/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/cmd/sigsvr/common" + "github.com/ontio/ontology/v2/common/log" ) var DefCliRpcSvr = NewCliRpcServer() diff --git a/cmd/sigsvr/import_wallet.go b/cmd/sigsvr/import_wallet.go index cb269289d4..d6765eed16 100644 --- a/cmd/sigsvr/import_wallet.go +++ b/cmd/sigsvr/import_wallet.go @@ -20,11 +20,11 @@ package sigsvr import ( "fmt" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd" - "github.com/ontio/ontology/cmd/sigsvr/store" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd" + "github.com/ontio/ontology/v2/cmd/sigsvr/store" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" "github.com/urfave/cli" ) diff --git a/cmd/sigsvr/store/wallet_store.go b/cmd/sigsvr/store/wallet_store.go index debb861f77..db9a18b86d 100644 --- a/cmd/sigsvr/store/wallet_store.go +++ b/cmd/sigsvr/store/wallet_store.go @@ -26,8 +26,8 @@ import ( "github.com/ontio/ontology-crypto/keypair" s "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/core/types" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/filter" "github.com/syndtr/goleveldb/leveldb/opt" diff --git a/cmd/tx_cmd.go b/cmd/tx_cmd.go index df2bb7356b..cab0c2c565 100644 --- a/cmd/tx_cmd.go +++ b/cmd/tx_cmd.go @@ -23,10 +23,10 @@ import ( "strconv" "strings" - cmdcom "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" + cmdcom "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" "github.com/urfave/cli" ) diff --git a/cmd/usage.go b/cmd/usage.go index 62177473bb..1c8b7eafdb 100644 --- a/cmd/usage.go +++ b/cmd/usage.go @@ -27,7 +27,7 @@ import ( "strings" "text/template" - "github.com/ontio/ontology/cmd/utils" + "github.com/ontio/ontology/v2/cmd/utils" "github.com/urfave/cli" ) diff --git a/cmd/utils/export.go b/cmd/utils/export.go index 09d04b82e4..c6ce3c5354 100644 --- a/cmd/utils/export.go +++ b/cmd/utils/export.go @@ -25,7 +25,7 @@ import ( "io" "io/ioutil" - "github.com/ontio/ontology/common/serialization" + "github.com/ontio/ontology/v2/common/serialization" ) const ( diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 5c90f187d9..6c7426e554 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -21,9 +21,9 @@ package utils import ( "strings" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" "github.com/urfave/cli" ) diff --git a/cmd/utils/native_param.go b/cmd/utils/native_param.go index eaaf8f82eb..1b9ce6c516 100644 --- a/cmd/utils/native_param.go +++ b/cmd/utils/native_param.go @@ -27,12 +27,12 @@ import ( "strconv" "strings" - "github.com/ontio/ontology/cmd/abi" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - httpcom "github.com/ontio/ontology/http/base/common" - svrneovm "github.com/ontio/ontology/smartcontract/service/neovm" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/cmd/abi" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + httpcom "github.com/ontio/ontology/v2/http/base/common" + svrneovm "github.com/ontio/ontology/v2/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/vm/neovm" ) func NewNativeInvokeTransaction(gasPrice, gasLimit uint64, contractAddr common.Address, version byte, diff --git a/cmd/utils/native_param_test.go b/cmd/utils/native_param_test.go index b85c529610..4bacec2a2f 100644 --- a/cmd/utils/native_param_test.go +++ b/cmd/utils/native_param_test.go @@ -23,9 +23,9 @@ import ( "encoding/hex" "testing" - "github.com/ontio/ontology/cmd/abi" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/cmd/abi" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/vm/neovm" ) func TestParseNativeParam(t *testing.T) { diff --git a/cmd/utils/neovm_param_abi.go b/cmd/utils/neovm_param_abi.go index 269b2f589f..ed403dfde8 100644 --- a/cmd/utils/neovm_param_abi.go +++ b/cmd/utils/neovm_param_abi.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "github.com/ontio/ontology/cmd/abi" + "github.com/ontio/ontology/v2/cmd/abi" ) func NewNeovmContractAbi(abiData []byte) (*abi.NeovmContractAbi, error) { diff --git a/cmd/utils/ont.go b/cmd/utils/ont.go index 2aba7b5b67..2b592310ed 100644 --- a/cmd/utils/ont.go +++ b/cmd/utils/ont.go @@ -32,18 +32,18 @@ import ( "github.com/ontio/ontology-crypto/keypair" sig "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/serialization" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - cutils "github.com/ontio/ontology/core/utils" - httpcom "github.com/ontio/ontology/http/base/common" - rpccommon "github.com/ontio/ontology/http/base/common" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/serialization" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + cutils "github.com/ontio/ontology/v2/core/utils" + httpcom "github.com/ontio/ontology/v2/http/base/common" + rpccommon "github.com/ontio/ontology/v2/http/base/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/cmd/utils/params.go b/cmd/utils/params.go index 3d5c2b7214..6cbe5f1aad 100644 --- a/cmd/utils/params.go +++ b/cmd/utils/params.go @@ -25,8 +25,8 @@ import ( "strconv" "strings" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" ) const ( diff --git a/cmd/utils/rpc.go b/cmd/utils/rpc.go index 7fe4e16f59..a5e88b2ef5 100644 --- a/cmd/utils/rpc.go +++ b/cmd/utils/rpc.go @@ -25,8 +25,8 @@ import ( "net/http" "strings" - "github.com/ontio/ontology/common/config" - rpcerr "github.com/ontio/ontology/http/base/error" + "github.com/ontio/ontology/v2/common/config" + rpcerr "github.com/ontio/ontology/v2/http/base/error" ) //JsonRpc version diff --git a/cmd/utils/utils.go b/cmd/utils/utils.go index 8739a4581f..149b9f2c5c 100644 --- a/cmd/utils/utils.go +++ b/cmd/utils/utils.go @@ -28,7 +28,7 @@ import ( "os" "strings" - "github.com/ontio/ontology/common/constants" + "github.com/ontio/ontology/v2/common/constants" ) const ( diff --git a/common/config/config.go b/common/config/config.go index 2d5ad82ee6..85322e9a7e 100644 --- a/common/config/config.go +++ b/common/config/config.go @@ -27,10 +27,10 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/errors" ) var Version = "v2.0.0" //Set value when build project diff --git a/common/zero_copy_sink_test.go b/common/zero_copy_sink_test.go index e465c11629..0519834294 100644 --- a/common/zero_copy_sink_test.go +++ b/common/zero_copy_sink_test.go @@ -21,7 +21,7 @@ import ( "bytes" "testing" - ser "github.com/ontio/ontology/common/serialization" + ser "github.com/ontio/ontology/v2/common/serialization" "github.com/stretchr/testify/assert" ) diff --git a/common/zero_copy_source_test.go b/common/zero_copy_source_test.go index 912373a940..fde0a88df9 100644 --- a/common/zero_copy_source_test.go +++ b/common/zero_copy_source_test.go @@ -22,7 +22,7 @@ import ( "crypto/rand" "testing" - "github.com/ontio/ontology/common/serialization" + "github.com/ontio/ontology/v2/common/serialization" "github.com/stretchr/testify/assert" ) diff --git a/consensus/actor/actor.go b/consensus/actor/actor.go index 6db49e1ae1..4645a7b617 100644 --- a/consensus/actor/actor.go +++ b/consensus/actor/actor.go @@ -23,9 +23,9 @@ import ( "time" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/core/types" - ontErrors "github.com/ontio/ontology/errors" - txpool "github.com/ontio/ontology/txnpool/common" + "github.com/ontio/ontology/v2/core/types" + ontErrors "github.com/ontio/ontology/v2/errors" + txpool "github.com/ontio/ontology/v2/txnpool/common" ) type TxPoolActor struct { diff --git a/consensus/actor/message.go b/consensus/actor/message.go index 63b818193f..de1827ff1f 100644 --- a/consensus/actor/message.go +++ b/consensus/actor/message.go @@ -18,7 +18,7 @@ package actor -import "github.com/ontio/ontology/core/types" +import "github.com/ontio/ontology/v2/core/types" type StartConsensus struct{} type StopConsensus struct{} diff --git a/consensus/consensus.go b/consensus/consensus.go index d5d759ac18..44091c3565 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -20,12 +20,12 @@ package consensus import ( "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/consensus/dbft" - "github.com/ontio/ontology/consensus/solo" - "github.com/ontio/ontology/consensus/vbft" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/consensus/dbft" + "github.com/ontio/ontology/v2/consensus/solo" + "github.com/ontio/ontology/v2/consensus/vbft" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" ) type ConsensusService interface { diff --git a/consensus/dbft/block_signatures.go b/consensus/dbft/block_signatures.go index 96cff06b96..bb49bf9f41 100644 --- a/consensus/dbft/block_signatures.go +++ b/consensus/dbft/block_signatures.go @@ -21,7 +21,7 @@ package dbft import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type BlockSignatures struct { diff --git a/consensus/dbft/change_view.go b/consensus/dbft/change_view.go index def499c0bf..9dc0f7ea62 100644 --- a/consensus/dbft/change_view.go +++ b/consensus/dbft/change_view.go @@ -21,7 +21,7 @@ package dbft import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type ChangeView struct { diff --git a/consensus/dbft/consensus_context.go b/consensus/dbft/consensus_context.go index 96fb078091..dbd925552a 100644 --- a/consensus/dbft/consensus_context.go +++ b/consensus/dbft/consensus_context.go @@ -22,13 +22,13 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/vote" - msg "github.com/ontio/ontology/p2pserver/message/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/vote" + msg "github.com/ontio/ontology/v2/p2pserver/message/types" ) const ContextVersion uint32 = 0 diff --git a/consensus/dbft/consensus_message.go b/consensus/dbft/consensus_message.go index 1833512dac..ed1b0c7713 100644 --- a/consensus/dbft/consensus_message.go +++ b/consensus/dbft/consensus_message.go @@ -22,8 +22,8 @@ import ( "errors" "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) type ConsensusMessage interface { diff --git a/consensus/dbft/dbft_service.go b/consensus/dbft/dbft_service.go index 4acdd5cb02..5d05662d53 100644 --- a/consensus/dbft/dbft_service.go +++ b/consensus/dbft/dbft_service.go @@ -24,22 +24,22 @@ import ( "time" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - actorTypes "github.com/ontio/ontology/consensus/actor" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/vote" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - p2pmsg "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/validator/increment" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + actorTypes "github.com/ontio/ontology/v2/consensus/actor" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/vote" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + p2pmsg "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/validator/increment" ) type DbftService struct { diff --git a/consensus/dbft/prepare_request.go b/consensus/dbft/prepare_request.go index 28caed11f3..76c8aae7e3 100644 --- a/consensus/dbft/prepare_request.go +++ b/consensus/dbft/prepare_request.go @@ -22,9 +22,9 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" ) type PrepareRequest struct { diff --git a/consensus/dbft/prepare_response.go b/consensus/dbft/prepare_response.go index e3318a18e0..acb9540209 100644 --- a/consensus/dbft/prepare_response.go +++ b/consensus/dbft/prepare_response.go @@ -21,7 +21,7 @@ package dbft import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type PrepareResponse struct { diff --git a/consensus/solo/solo.go b/consensus/solo/solo.go index a5f4b61188..74033a81cd 100644 --- a/consensus/solo/solo.go +++ b/consensus/solo/solo.go @@ -25,17 +25,17 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - actorTypes "github.com/ontio/ontology/consensus/actor" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" - "github.com/ontio/ontology/validator/increment" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + actorTypes "github.com/ontio/ontology/v2/consensus/actor" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" + "github.com/ontio/ontology/v2/validator/increment" ) /* diff --git a/consensus/vbft/block_pool.go b/consensus/vbft/block_pool.go index d209af45f5..2e0823e636 100644 --- a/consensus/vbft/block_pool.go +++ b/consensus/vbft/block_pool.go @@ -26,9 +26,9 @@ import ( "sync" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/store/overlaydb" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/store/overlaydb" ) type BlockList []*Block diff --git a/consensus/vbft/block_pool_test.go b/consensus/vbft/block_pool_test.go index 31058da887..4d93ea41e0 100644 --- a/consensus/vbft/block_pool_test.go +++ b/consensus/vbft/block_pool_test.go @@ -24,11 +24,11 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" ) func buildTestBlockPool(t *testing.T) (*BlockPool, error) { diff --git a/consensus/vbft/chain_store.go b/consensus/vbft/chain_store.go index 5ed820dd0b..4446351a7a 100644 --- a/consensus/vbft/chain_store.go +++ b/consensus/vbft/chain_store.go @@ -22,13 +22,13 @@ import ( "fmt" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/store" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/events/message" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/store" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/events/message" ) type PendingBlock struct { diff --git a/consensus/vbft/chain_store_test.go b/consensus/vbft/chain_store_test.go index ef3fdd12ab..633b250d66 100644 --- a/consensus/vbft/chain_store_test.go +++ b/consensus/vbft/chain_store_test.go @@ -23,12 +23,12 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "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/genesis" - "github.com/ontio/ontology/core/ledger" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" ) var testBookkeeperAccounts []*account.Account diff --git a/consensus/vbft/config/config.go b/consensus/vbft/config/config.go index a6f6d7fa5c..efcfcfe8fd 100644 --- a/consensus/vbft/config/config.go +++ b/consensus/vbft/config/config.go @@ -26,7 +26,7 @@ import ( "io" "time" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) var ( diff --git a/consensus/vbft/config/genesis.go b/consensus/vbft/config/genesis.go index 676577f904..ecb9f58761 100644 --- a/consensus/vbft/config/genesis.go +++ b/consensus/vbft/config/genesis.go @@ -28,9 +28,9 @@ import ( "strings" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" ) func shuffle_hash(txid common.Uint256, height uint32, id string, idx int) (uint64, error) { diff --git a/consensus/vbft/config/genesis_test.go b/consensus/vbft/config/genesis_test.go index d46dfbeb53..0cc91748ef 100644 --- a/consensus/vbft/config/genesis_test.go +++ b/consensus/vbft/config/genesis_test.go @@ -21,9 +21,9 @@ package vconfig import ( "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" ) func constructConfig() (*config.VBFTConfig, error) { diff --git a/consensus/vbft/config/types.go b/consensus/vbft/config/types.go index 3234b35f62..8a8f10c72f 100644 --- a/consensus/vbft/config/types.go +++ b/consensus/vbft/config/types.go @@ -24,7 +24,7 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/core/types" ) // PubkeyID returns a marshaled representation of the given public key. diff --git a/consensus/vbft/event_timer.go b/consensus/vbft/event_timer.go index 43fe001439..f203a37d94 100644 --- a/consensus/vbft/event_timer.go +++ b/consensus/vbft/event_timer.go @@ -25,7 +25,7 @@ import ( "sync" "time" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common/log" ) type TimerEventType int diff --git a/consensus/vbft/msg_builder.go b/consensus/vbft/msg_builder.go index cadc4ef07b..59e86c3c4a 100644 --- a/consensus/vbft/msg_builder.go +++ b/consensus/vbft/msg_builder.go @@ -24,12 +24,12 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" ) type ConsensusMsgPayload struct { diff --git a/consensus/vbft/msg_builder_test.go b/consensus/vbft/msg_builder_test.go index 5878359206..5b6e9b554c 100644 --- a/consensus/vbft/msg_builder_test.go +++ b/consensus/vbft/msg_builder_test.go @@ -22,7 +22,7 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/account" + "github.com/ontio/ontology/v2/account" ) func constructMsg() *blockProposalMsg { diff --git a/consensus/vbft/msg_pool.go b/consensus/vbft/msg_pool.go index c66ed10085..a648922fa7 100644 --- a/consensus/vbft/msg_pool.go +++ b/consensus/vbft/msg_pool.go @@ -22,7 +22,7 @@ import ( "errors" "sync" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) var errDropFarFutureMsg = errors.New("msg pool dropped msg for far future") diff --git a/consensus/vbft/msg_types.go b/consensus/vbft/msg_types.go index 31044a43a6..5a51b88f79 100644 --- a/consensus/vbft/msg_types.go +++ b/consensus/vbft/msg_types.go @@ -26,9 +26,9 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/serialization" - vconfig "github.com/ontio/ontology/consensus/vbft/config" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/serialization" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" ) type MsgType uint8 diff --git a/consensus/vbft/msg_types_test.go b/consensus/vbft/msg_types_test.go index e08556ca2d..b39e765d73 100644 --- a/consensus/vbft/msg_types_test.go +++ b/consensus/vbft/msg_types_test.go @@ -23,11 +23,11 @@ import ( "testing" "time" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" ) func constructProposalMsgTest(acc *account.Account) *blockProposalMsg { diff --git a/consensus/vbft/node_sync.go b/consensus/vbft/node_sync.go index 0690edab02..6b31345cba 100644 --- a/consensus/vbft/node_sync.go +++ b/consensus/vbft/node_sync.go @@ -23,9 +23,9 @@ import ( "sync" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" ) type SyncCheckReq struct { diff --git a/consensus/vbft/node_utils.go b/consensus/vbft/node_utils.go index de99361bf4..f1b5b9df0c 100644 --- a/consensus/vbft/node_utils.go +++ b/consensus/vbft/node_utils.go @@ -22,12 +22,12 @@ import ( "fmt" "math" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/signature" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - p2pmsg "github.com/ontio/ontology/p2pserver/message/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/signature" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + p2pmsg "github.com/ontio/ontology/v2/p2pserver/message/types" ) func (self *Server) GetCurrentBlockNo() uint32 { diff --git a/consensus/vbft/node_utils_test.go b/consensus/vbft/node_utils_test.go index c5b86b34dc..1d8e7f045f 100644 --- a/consensus/vbft/node_utils_test.go +++ b/consensus/vbft/node_utils_test.go @@ -24,9 +24,9 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - vconfig "github.com/ontio/ontology/consensus/vbft/config" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" ) func peerPool() *PeerPool { diff --git a/consensus/vbft/peer_pool.go b/consensus/vbft/peer_pool.go index bd84a22e01..5c922166e4 100644 --- a/consensus/vbft/peer_pool.go +++ b/consensus/vbft/peer_pool.go @@ -24,8 +24,8 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/p2pserver/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Peer struct { diff --git a/consensus/vbft/peer_pool_test.go b/consensus/vbft/peer_pool_test.go index 713672fe08..b2cac539f0 100644 --- a/consensus/vbft/peer_pool_test.go +++ b/consensus/vbft/peer_pool_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - "github.com/ontio/ontology/common" - vconfig "github.com/ontio/ontology/consensus/vbft/config" + "github.com/ontio/ontology/v2/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" ) func constructPeerPool(connect bool) *PeerPool { diff --git a/consensus/vbft/service.go b/consensus/vbft/service.go index 4af0a6559d..8ec53c1dca 100644 --- a/consensus/vbft/service.go +++ b/consensus/vbft/service.go @@ -29,23 +29,23 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/vrf" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - actorTypes "github.com/ontio/ontology/consensus/actor" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" - p2pmsg "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - gover "github.com/ontio/ontology/smartcontract/service/native/governance" - ninit "github.com/ontio/ontology/smartcontract/service/native/init" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/validator/increment" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + actorTypes "github.com/ontio/ontology/v2/consensus/actor" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" + p2pmsg "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + gover "github.com/ontio/ontology/v2/smartcontract/service/native/governance" + ninit "github.com/ontio/ontology/v2/smartcontract/service/native/init" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/validator/increment" ) type BftActionType uint8 diff --git a/consensus/vbft/state_mgmt.go b/consensus/vbft/state_mgmt.go index 7736f91902..dac1fdfff7 100644 --- a/consensus/vbft/state_mgmt.go +++ b/consensus/vbft/state_mgmt.go @@ -22,7 +22,7 @@ import ( "math" "time" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common/log" ) const ( diff --git a/consensus/vbft/state_mgmt_test.go b/consensus/vbft/state_mgmt_test.go index bebf571cff..11d5d57872 100644 --- a/consensus/vbft/state_mgmt_test.go +++ b/consensus/vbft/state_mgmt_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common/log" ) func Test_isReady(t *testing.T) { diff --git a/consensus/vbft/types.go b/consensus/vbft/types.go index 1966082e9b..b40ba6fc71 100644 --- a/consensus/vbft/types.go +++ b/consensus/vbft/types.go @@ -23,9 +23,9 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/types" ) type Block struct { diff --git a/consensus/vbft/types_test.go b/consensus/vbft/types_test.go index 67fa70b07b..492d2c16f8 100644 --- a/consensus/vbft/types_test.go +++ b/consensus/vbft/types_test.go @@ -22,9 +22,9 @@ import ( "reflect" "testing" - "github.com/ontio/ontology/common" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/types" ) func TestBlock_getProposer(t *testing.T) { diff --git a/consensus/vbft/utils.go b/consensus/vbft/utils.go index 1d819889f5..313084d11d 100644 --- a/consensus/vbft/utils.go +++ b/consensus/vbft/utils.go @@ -27,17 +27,17 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/vrf" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/states" - scommon "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/overlaydb" - gov "github.com/ontio/ontology/smartcontract/service/native/governance" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/states" + scommon "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/overlaydb" + gov "github.com/ontio/ontology/v2/smartcontract/service/native/governance" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func SignMsg(account *account.Account, msg ConsensusMsg) ([]byte, error) { diff --git a/consensus/vbft/utils_test.go b/consensus/vbft/utils_test.go index c941dca436..8dc610721c 100644 --- a/consensus/vbft/utils_test.go +++ b/consensus/vbft/utils_test.go @@ -24,8 +24,8 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" ) func HashBlock(blk *Block) (common.Uint256, error) { diff --git a/core/genesis/genesis.go b/core/genesis/genesis.go index 9c488622b6..12f70ef316 100644 --- a/core/genesis/genesis.go +++ b/core/genesis/genesis.go @@ -25,18 +25,18 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/governance" - "github.com/ontio/ontology/smartcontract/service/native/ont" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/governance" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" ) const ( diff --git a/core/genesis/genesis_test.go b/core/genesis/genesis_test.go index 62fe2b537f..5a99d57057 100644 --- a/core/genesis/genesis_test.go +++ b/core/genesis/genesis_test.go @@ -22,9 +22,9 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" "github.com/stretchr/testify/assert" ) diff --git a/core/ledger/ledger.go b/core/ledger/ledger.go index c8ad80be1b..91823f5445 100644 --- a/core/ledger/ledger.go +++ b/core/ledger/ledger.go @@ -22,15 +22,15 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/store" - "github.com/ontio/ontology/core/store/ledgerstore" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/event" - cstate "github.com/ontio/ontology/smartcontract/states" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/store" + "github.com/ontio/ontology/v2/core/store/ledgerstore" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/event" + cstate "github.com/ontio/ontology/v2/smartcontract/states" ) var DefLedger *Ledger diff --git a/core/payload/bookkeeper.go b/core/payload/bookkeeper.go index b063c016a9..5bc6c10d74 100644 --- a/core/payload/bookkeeper.go +++ b/core/payload/bookkeeper.go @@ -23,7 +23,7 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) const BookkeeperPayloadVersion byte = 0x00 diff --git a/core/payload/bookkeeper_test.go b/core/payload/bookkeeper_test.go index ae0f996540..fa2e805512 100644 --- a/core/payload/bookkeeper_test.go +++ b/core/payload/bookkeeper_test.go @@ -23,7 +23,7 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/payload/deploy_code.go b/core/payload/deploy_code.go index baaa6fe68c..8ac7e9dfaf 100644 --- a/core/payload/deploy_code.go +++ b/core/payload/deploy_code.go @@ -22,8 +22,8 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" ) type VmType byte diff --git a/core/payload/deploy_code_test.go b/core/payload/deploy_code_test.go index f9cce7b2ae..57778dec8a 100644 --- a/core/payload/deploy_code_test.go +++ b/core/payload/deploy_code_test.go @@ -20,7 +20,7 @@ package payload import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/payload/invoke_code.go b/core/payload/invoke_code.go index 57bc9888e1..5b95207da6 100644 --- a/core/payload/invoke_code.go +++ b/core/payload/invoke_code.go @@ -21,7 +21,7 @@ package payload import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) // InvokeCode is an implementation of transaction payload for invoke smartcontract diff --git a/core/payload/invoke_code_test.go b/core/payload/invoke_code_test.go index 3a57dc1075..d182b0e4fd 100644 --- a/core/payload/invoke_code_test.go +++ b/core/payload/invoke_code_test.go @@ -20,7 +20,7 @@ package payload import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/program/program.go b/core/program/program.go index 5c148e904b..913b0eea9a 100644 --- a/core/program/program.go +++ b/core/program/program.go @@ -26,9 +26,9 @@ import ( "math/big" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/vm/neovm" ) type ProgramBuilder struct { diff --git a/core/states/bookkeeper.go b/core/states/bookkeeper.go index 0103ad5ed6..f6ac6c3569 100644 --- a/core/states/bookkeeper.go +++ b/core/states/bookkeeper.go @@ -22,7 +22,7 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type BookkeeperState struct { diff --git a/core/states/bookkeeper_test.go b/core/states/bookkeeper_test.go index db02f3a6e9..642bb9b45e 100644 --- a/core/states/bookkeeper_test.go +++ b/core/states/bookkeeper_test.go @@ -21,7 +21,7 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/states/state_base.go b/core/states/state_base.go index e5e40d23a6..751a96dab2 100644 --- a/core/states/state_base.go +++ b/core/states/state_base.go @@ -21,7 +21,7 @@ package states import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type StateBase struct { diff --git a/core/states/state_base_test.go b/core/states/state_base_test.go index ff3b759a1c..dab8917444 100644 --- a/core/states/state_base_test.go +++ b/core/states/state_base_test.go @@ -20,7 +20,7 @@ package states import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) func TestStateBase_Serialize_Deserialize(t *testing.T) { diff --git a/core/states/storage_item.go b/core/states/storage_item.go index b808fb4529..2a29d1e76a 100644 --- a/core/states/storage_item.go +++ b/core/states/storage_item.go @@ -21,8 +21,8 @@ package states import ( "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" ) type StorageItem struct { diff --git a/core/states/storage_item_test.go b/core/states/storage_item_test.go index f255ea74cd..7d61f8ac82 100644 --- a/core/states/storage_item_test.go +++ b/core/states/storage_item_test.go @@ -20,7 +20,7 @@ package states import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) func TestStorageItem_Serialize_Deserialize(t *testing.T) { diff --git a/core/states/storage_key.go b/core/states/storage_key.go index 8a1d31e067..39f6730b8d 100644 --- a/core/states/storage_key.go +++ b/core/states/storage_key.go @@ -21,7 +21,7 @@ package states import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type StorageKey struct { diff --git a/core/states/storage_key_test.go b/core/states/storage_key_test.go index 2330b3fd84..5d1def32a6 100644 --- a/core/states/storage_key_test.go +++ b/core/states/storage_key_test.go @@ -22,7 +22,7 @@ import ( "crypto/rand" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/states/validator_state.go b/core/states/validator_state.go index dfe37113f5..eb22b1f52d 100644 --- a/core/states/validator_state.go +++ b/core/states/validator_state.go @@ -22,8 +22,8 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" ) type ValidatorState struct { diff --git a/core/states/validator_state_test.go b/core/states/validator_state_test.go index 1b9ed838d8..7b4e24fb1a 100644 --- a/core/states/validator_state_test.go +++ b/core/states/validator_state_test.go @@ -21,7 +21,7 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/states/vote_state.go b/core/states/vote_state.go index e450db0d23..e786e0aa13 100644 --- a/core/states/vote_state.go +++ b/core/states/vote_state.go @@ -22,7 +22,7 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type VoteState struct { diff --git a/core/states/vote_state_test.go b/core/states/vote_state_test.go index f1a90a0815..d36a82af9e 100644 --- a/core/states/vote_state_test.go +++ b/core/states/vote_state_test.go @@ -21,7 +21,7 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/store/common/store.go b/core/store/common/store.go index c87e4c371c..94d2f51e01 100644 --- a/core/store/common/store.go +++ b/core/store/common/store.go @@ -21,8 +21,8 @@ package common import ( "errors" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/event" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/event" ) var ErrNotFound = errors.New("not found") diff --git a/core/store/ledgerstore/block_cache.go b/core/store/ledgerstore/block_cache.go index 0c540354bc..516c16be59 100644 --- a/core/store/ledgerstore/block_cache.go +++ b/core/store/ledgerstore/block_cache.go @@ -22,8 +22,8 @@ import ( "fmt" lru "github.com/hashicorp/golang-lru" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" ) const ( diff --git a/core/store/ledgerstore/block_store.go b/core/store/ledgerstore/block_store.go index cd022439de..ec6711a7b9 100644 --- a/core/store/ledgerstore/block_store.go +++ b/core/store/ledgerstore/block_store.go @@ -24,11 +24,11 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/serialization" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/serialization" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/types" ) //Block store save the data of block & transaction diff --git a/core/store/ledgerstore/block_store_test.go b/core/store/ledgerstore/block_store_test.go index 146c9156a6..34e262f5af 100644 --- a/core/store/ledgerstore/block_store_test.go +++ b/core/store/ledgerstore/block_store_test.go @@ -25,13 +25,13 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/smartcontract/service/native/ont" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" "github.com/stretchr/testify/assert" ) diff --git a/core/store/ledgerstore/cross_chain_store.go b/core/store/ledgerstore/cross_chain_store.go index e170fe3ed0..1a87539a41 100644 --- a/core/store/ledgerstore/cross_chain_store.go +++ b/core/store/ledgerstore/cross_chain_store.go @@ -22,10 +22,10 @@ import ( "fmt" "os" - "github.com/ontio/ontology/common" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/types" ) const ( diff --git a/core/store/ledgerstore/event_store.go b/core/store/ledgerstore/event_store.go index f7fd1e7fec..4dcc097037 100644 --- a/core/store/ledgerstore/event_store.go +++ b/core/store/ledgerstore/event_store.go @@ -24,12 +24,12 @@ import ( "encoding/json" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/common/serialization" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/smartcontract/event" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/common/serialization" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/smartcontract/event" ) //Saving event notifies gen by smart contract execution diff --git a/core/store/ledgerstore/ledger_store.go b/core/store/ledgerstore/ledger_store.go index e9a280a3f4..7e7628c015 100644 --- a/core/store/ledgerstore/ledger_store.go +++ b/core/store/ledgerstore/ledger_store.go @@ -32,29 +32,29 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "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" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/store" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" - "github.com/ontio/ontology/merkle" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/service/neovm" - "github.com/ontio/ontology/smartcontract/service/wasmvm" - sstate "github.com/ontio/ontology/smartcontract/states" - "github.com/ontio/ontology/smartcontract/storage" - types2 "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/store" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" + "github.com/ontio/ontology/v2/merkle" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/smartcontract/service/wasmvm" + sstate "github.com/ontio/ontology/v2/smartcontract/states" + "github.com/ontio/ontology/v2/smartcontract/storage" + types2 "github.com/ontio/ontology/v2/vm/neovm/types" ) const ( diff --git a/core/store/ledgerstore/ledger_store_test.go b/core/store/ledgerstore/ledger_store_test.go index ac0debb130..04f0f6a889 100644 --- a/core/store/ledgerstore/ledger_store_test.go +++ b/core/store/ledgerstore/ledger_store_test.go @@ -24,10 +24,10 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/genesis" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/genesis" ) var testBlockStore *BlockStore diff --git a/core/store/ledgerstore/state_store.go b/core/store/ledgerstore/state_store.go index 40fa169d96..5e4d317703 100644 --- a/core/store/ledgerstore/state_store.go +++ b/core/store/ledgerstore/state_store.go @@ -25,17 +25,17 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/common/serialization" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/states" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/merkle" - "github.com/ontio/ontology/smartcontract/service/native/ontid" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/common/serialization" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/states" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/merkle" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontid" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) var ( diff --git a/core/store/ledgerstore/state_store_test.go b/core/store/ledgerstore/state_store_test.go index 256c61dbab..d6d628e6ca 100644 --- a/core/store/ledgerstore/state_store_test.go +++ b/core/store/ledgerstore/state_store_test.go @@ -22,8 +22,8 @@ import ( "math/rand" "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/merkle" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/merkle" "github.com/stretchr/testify/assert" ) diff --git a/core/store/ledgerstore/tx_handler.go b/core/store/ledgerstore/tx_handler.go index f45fcef2b9..db318e5ee0 100644 --- a/core/store/ledgerstore/tx_handler.go +++ b/core/store/ledgerstore/tx_handler.go @@ -24,24 +24,24 @@ import ( "math" "strconv" - "github.com/ontio/ontology/common" - sysconfig "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/store" - scommon "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - ninit "github.com/ontio/ontology/smartcontract/service/native/init" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/service/neovm" - "github.com/ontio/ontology/smartcontract/service/wasmvm" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/common" + sysconfig "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/store" + scommon "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + ninit "github.com/ontio/ontology/v2/smartcontract/service/native/init" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/smartcontract/service/wasmvm" + "github.com/ontio/ontology/v2/smartcontract/storage" ) func tuneGasFeeByHeight(height uint32, gas uint64, gasRound uint64, curBalance uint64) uint64 { diff --git a/core/store/leveldbstore/leveldb_store.go b/core/store/leveldbstore/leveldb_store.go index 8b21ecb9b2..56c2dfa913 100644 --- a/core/store/leveldbstore/leveldb_store.go +++ b/core/store/leveldbstore/leveldb_store.go @@ -20,7 +20,7 @@ package leveldbstore import ( "github.com/ethereum/go-ethereum/common/fdlimit" - "github.com/ontio/ontology/core/store/common" + "github.com/ontio/ontology/v2/core/store/common" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/filter" diff --git a/core/store/overlaydb/iterator.go b/core/store/overlaydb/iterator.go index f04325e7d8..19870990af 100644 --- a/core/store/overlaydb/iterator.go +++ b/core/store/overlaydb/iterator.go @@ -18,7 +18,7 @@ package overlaydb import ( - "github.com/ontio/ontology/core/store/common" + "github.com/ontio/ontology/v2/core/store/common" "github.com/syndtr/goleveldb/leveldb/comparer" ) diff --git a/core/store/overlaydb/overlaydb.go b/core/store/overlaydb/overlaydb.go index 06f989279b..4b845dc62a 100644 --- a/core/store/overlaydb/overlaydb.go +++ b/core/store/overlaydb/overlaydb.go @@ -21,8 +21,8 @@ package overlaydb import ( "crypto/sha256" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/store/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/store/common" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/core/store/overlaydb/overlaydb_test.go b/core/store/overlaydb/overlaydb_test.go index c424bcd617..4ba183f099 100644 --- a/core/store/overlaydb/overlaydb_test.go +++ b/core/store/overlaydb/overlaydb_test.go @@ -23,7 +23,7 @@ import ( "strconv" "testing" - "github.com/ontio/ontology/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/leveldbstore" "github.com/stretchr/testify/assert" ) diff --git a/core/store/store.go b/core/store/store.go index 61a128df26..0fec125c7d 100644 --- a/core/store/store.go +++ b/core/store/store.go @@ -20,13 +20,13 @@ package store import ( "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/event" - cstates "github.com/ontio/ontology/smartcontract/states" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/event" + cstates "github.com/ontio/ontology/v2/smartcontract/states" ) type ExecuteResult struct { diff --git a/core/tests/signature_test.go b/core/tests/signature_test.go index ec4cc47702..081d9a4b7b 100644 --- a/core/tests/signature_test.go +++ b/core/tests/signature_test.go @@ -21,8 +21,8 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/core/signature" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/core/signature" "github.com/stretchr/testify/assert" ) diff --git a/core/types/address.go b/core/types/address.go index cc73e0f027..159fa89ed6 100644 --- a/core/types/address.go +++ b/core/types/address.go @@ -22,9 +22,9 @@ import ( "errors" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/core/program" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/core/program" ) func AddressFromPubKey(pubkey keypair.PublicKey) common.Address { diff --git a/core/types/block.go b/core/types/block.go index 2f3498efa5..299d46c8a5 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -22,7 +22,7 @@ import ( "errors" "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type Block struct { diff --git a/core/types/cross_state.go b/core/types/cross_state.go index d41a9f8c7e..70931a6159 100644 --- a/core/types/cross_state.go +++ b/core/types/cross_state.go @@ -21,7 +21,7 @@ import ( "crypto/sha256" "fmt" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) const ( diff --git a/core/types/cross_state_test.go b/core/types/cross_state_test.go index 173d22561c..9e60f9cb2c 100644 --- a/core/types/cross_state_test.go +++ b/core/types/cross_state_test.go @@ -20,7 +20,7 @@ package types import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/types/header.go b/core/types/header.go index 3f96880011..1673c5d60d 100644 --- a/core/types/header.go +++ b/core/types/header.go @@ -23,7 +23,7 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type RawHeader struct { diff --git a/core/types/header_test.go b/core/types/header_test.go index eace312f52..03ee22e324 100644 --- a/core/types/header_test.go +++ b/core/types/header_test.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/core/types/mutable_transaction.go b/core/types/mutable_transaction.go index 3f896def5b..317d350a68 100644 --- a/core/types/mutable_transaction.go +++ b/core/types/mutable_transaction.go @@ -21,8 +21,8 @@ package types import ( "errors" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" ) type MutableTransaction struct { diff --git a/core/types/smartcontract.go b/core/types/smartcontract.go index c4036e8eac..c021152812 100644 --- a/core/types/smartcontract.go +++ b/core/types/smartcontract.go @@ -18,7 +18,7 @@ package types -import "github.com/ontio/ontology/common" +import "github.com/ontio/ontology/v2/common" type SmartCodeEvent struct { TxHash common.Uint256 diff --git a/core/types/transaction.go b/core/types/transaction.go index d1aa28ddaf..69bb15de9a 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -25,10 +25,10 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/program" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/program" ) const MAX_TX_SIZE = 1024 * 1024 // The max size of a transaction to prevent DOS attacks diff --git a/core/types/transaction_attribute.go b/core/types/transaction_attribute.go index b33ce64e44..33e05aaacd 100644 --- a/core/types/transaction_attribute.go +++ b/core/types/transaction_attribute.go @@ -23,7 +23,7 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type TransactionAttributeUsage byte diff --git a/core/utils/transaction_builder.go b/core/utils/transaction_builder.go index 8a723fb2ff..7384d6a234 100644 --- a/core/utils/transaction_builder.go +++ b/core/utils/transaction_builder.go @@ -26,11 +26,11 @@ import ( "reflect" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/states" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/states" + vm "github.com/ontio/ontology/v2/vm/neovm" ) const NATIVE_INVOKE_NAME = "Ontology.Native.Invoke" // copy from smartcontract/service/neovm/config.go to avoid cycle dependences diff --git a/core/validation/block_validator.go b/core/validation/block_validator.go index 210e758bc6..9db549cc64 100644 --- a/core/validation/block_validator.go +++ b/core/validation/block_validator.go @@ -22,10 +22,10 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - ontErrors "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + ontErrors "github.com/ontio/ontology/v2/errors" ) // VerifyBlock checks whether the block is valid diff --git a/core/validation/transaction_validator.go b/core/validation/transaction_validator.go index e7b3b0ceee..450d04703e 100644 --- a/core/validation/transaction_validator.go +++ b/core/validation/transaction_validator.go @@ -22,16 +22,16 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - ontErrors "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/wasmvm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + ontErrors "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/wasmvm" ) // VerifyTransaction verifys received single transaction diff --git a/core/vote/validator.go b/core/vote/validator.go index 68aa809409..022afceea6 100644 --- a/core/vote/validator.go +++ b/core/vote/validator.go @@ -20,8 +20,8 @@ package vote import ( "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/types" ) func GetValidators(txs []*types.Transaction) ([]keypair.PublicKey, error) { diff --git a/events/message/message.go b/events/message/message.go index dc64eb3ede..1627428fab 100644 --- a/events/message/message.go +++ b/events/message/message.go @@ -19,7 +19,7 @@ package message import ( - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/core/types" ) const ( diff --git a/go.mod b/go.mod index 07b455ec29..1a71209672 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ontio/ontology +module github.com/ontio/ontology/v2 go 1.12 diff --git a/http/base/actor/consensus.go b/http/base/actor/consensus.go index af5cae8f3f..bc33125fa4 100644 --- a/http/base/actor/consensus.go +++ b/http/base/actor/consensus.go @@ -20,7 +20,7 @@ package actor import ( "github.com/ontio/ontology-eventbus/actor" - cactor "github.com/ontio/ontology/consensus/actor" + cactor "github.com/ontio/ontology/v2/consensus/actor" ) var consensusSrvPid *actor.PID diff --git a/http/base/actor/event.go b/http/base/actor/event.go index 22171e72dc..5245352a7b 100644 --- a/http/base/actor/event.go +++ b/http/base/actor/event.go @@ -20,8 +20,8 @@ package actor import ( "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" ) type EventActor struct { diff --git a/http/base/actor/ledger.go b/http/base/actor/ledger.go index b317667cc6..7c6549b9ef 100644 --- a/http/base/actor/ledger.go +++ b/http/base/actor/ledger.go @@ -19,12 +19,12 @@ package actor import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/event" - cstate "github.com/ontio/ontology/smartcontract/states" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/event" + cstate "github.com/ontio/ontology/v2/smartcontract/states" ) const ( diff --git a/http/base/actor/net_server.go b/http/base/actor/net_server.go index 5d915b8d26..06cdd934ca 100644 --- a/http/base/actor/net_server.go +++ b/http/base/actor/net_server.go @@ -19,8 +19,8 @@ package actor import ( - "github.com/ontio/ontology/p2pserver/common" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/common" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" ) var netServer p2p.P2P diff --git a/http/base/actor/txnpool.go b/http/base/actor/txnpool.go index a448d8335e..1700e21a7b 100644 --- a/http/base/actor/txnpool.go +++ b/http/base/actor/txnpool.go @@ -24,11 +24,11 @@ import ( "time" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - ontErrors "github.com/ontio/ontology/errors" - tcomn "github.com/ontio/ontology/txnpool/common" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + ontErrors "github.com/ontio/ontology/v2/errors" + tcomn "github.com/ontio/ontology/v2/txnpool/common" ) var txnPid *actor.PID diff --git a/http/base/actor/utils.go b/http/base/actor/utils.go index 9293554955..8f3bbeac7d 100644 --- a/http/base/actor/utils.go +++ b/http/base/actor/utils.go @@ -20,8 +20,8 @@ package actor import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func updateNativeSCAddr(hash common.Address) common.Address { diff --git a/http/base/common/common.go b/http/base/common/common.go index cc9683d8ff..591bcffbbf 100644 --- a/http/base/common/common.go +++ b/http/base/common/common.go @@ -28,21 +28,21 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - cutils "github.com/ontio/ontology/core/utils" - ontErrors "github.com/ontio/ontology/errors" - bactor "github.com/ontio/ontology/http/base/actor" - common2 "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" - cstate "github.com/ontio/ontology/smartcontract/states" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + cutils "github.com/ontio/ontology/v2/core/utils" + ontErrors "github.com/ontio/ontology/v2/errors" + bactor "github.com/ontio/ontology/v2/http/base/actor" + common2 "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + cstate "github.com/ontio/ontology/v2/smartcontract/states" + "github.com/ontio/ontology/v2/vm/neovm" ) const MAX_SEARCH_HEIGHT uint32 = 100 diff --git a/http/base/common/payload_to_hex.go b/http/base/common/payload_to_hex.go index 6340fa6de6..c6b8569fcc 100644 --- a/http/base/common/payload_to_hex.go +++ b/http/base/common/payload_to_hex.go @@ -19,9 +19,9 @@ package common import ( "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" ) type PayloadInfo interface{} diff --git a/http/base/error/error.go b/http/base/error/error.go index 862ca3d0cf..69b39aa0fb 100644 --- a/http/base/error/error.go +++ b/http/base/error/error.go @@ -19,7 +19,7 @@ // Package error privides error code for http package error -import ontErrors "github.com/ontio/ontology/errors" +import ontErrors "github.com/ontio/ontology/v2/errors" const ( SUCCESS int64 = 0 diff --git a/http/base/rest/interfaces.go b/http/base/rest/interfaces.go index 2ca9a5b3f8..fb81cf389f 100644 --- a/http/base/rest/interfaces.go +++ b/http/base/rest/interfaces.go @@ -21,16 +21,16 @@ package rest import ( "strconv" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/types" - ontErrors "github.com/ontio/ontology/errors" - bactor "github.com/ontio/ontology/http/base/actor" - bcomn "github.com/ontio/ontology/http/base/common" - berr "github.com/ontio/ontology/http/base/error" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/types" + ontErrors "github.com/ontio/ontology/v2/errors" + bactor "github.com/ontio/ontology/v2/http/base/actor" + bcomn "github.com/ontio/ontology/v2/http/base/common" + berr "github.com/ontio/ontology/v2/http/base/error" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const TLS_PORT int = 443 diff --git a/http/base/rpc/interfaces.go b/http/base/rpc/interfaces.go index 1ab41efec4..588398c90f 100644 --- a/http/base/rpc/interfaces.go +++ b/http/base/rpc/interfaces.go @@ -21,17 +21,17 @@ package rpc import ( "encoding/hex" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/payload" - scom "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/types" - ontErrors "github.com/ontio/ontology/errors" - bactor "github.com/ontio/ontology/http/base/actor" - bcomn "github.com/ontio/ontology/http/base/common" - berr "github.com/ontio/ontology/http/base/error" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/payload" + scom "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/types" + ontErrors "github.com/ontio/ontology/v2/errors" + bactor "github.com/ontio/ontology/v2/http/base/actor" + bcomn "github.com/ontio/ontology/v2/http/base/common" + berr "github.com/ontio/ontology/v2/http/base/error" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) //get best block hash diff --git a/http/base/rpc/local_interfaces.go b/http/base/rpc/local_interfaces.go index 244a2fd7f1..6379090aac 100644 --- a/http/base/rpc/local_interfaces.go +++ b/http/base/rpc/local_interfaces.go @@ -23,10 +23,10 @@ import ( "path/filepath" "time" - "github.com/ontio/ontology/common/log" - bactor "github.com/ontio/ontology/http/base/actor" - "github.com/ontio/ontology/http/base/common" - berr "github.com/ontio/ontology/http/base/error" + "github.com/ontio/ontology/v2/common/log" + bactor "github.com/ontio/ontology/v2/http/base/actor" + "github.com/ontio/ontology/v2/http/base/common" + berr "github.com/ontio/ontology/v2/http/base/error" ) const ( diff --git a/http/base/rpc/result.go b/http/base/rpc/result.go index 89d7e66854..a503046d11 100644 --- a/http/base/rpc/result.go +++ b/http/base/rpc/result.go @@ -19,7 +19,7 @@ package rpc import ( - Err "github.com/ontio/ontology/http/base/error" + Err "github.com/ontio/ontology/v2/http/base/error" ) func responseSuccess(result interface{}) map[string]interface{} { diff --git a/http/base/rpc/rpc.go b/http/base/rpc/rpc.go index 491d16c5c1..b4e527e8c2 100644 --- a/http/base/rpc/rpc.go +++ b/http/base/rpc/rpc.go @@ -29,9 +29,9 @@ import ( "strings" "sync" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/http/base/common" - berr "github.com/ontio/ontology/http/base/error" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/http/base/common" + berr "github.com/ontio/ontology/v2/http/base/error" ) func init() { diff --git a/http/jsonrpc/rpc_server.go b/http/jsonrpc/rpc_server.go index be207087fb..ea3c65b935 100644 --- a/http/jsonrpc/rpc_server.go +++ b/http/jsonrpc/rpc_server.go @@ -24,9 +24,9 @@ import ( "net/http" "strconv" - cfg "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/http/base/rpc" + cfg "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/http/base/rpc" ) func StartRPCServer() error { diff --git a/http/localrpc/local_server.go b/http/localrpc/local_server.go index 9e93f3cf95..a5fe628df2 100644 --- a/http/localrpc/local_server.go +++ b/http/localrpc/local_server.go @@ -24,9 +24,9 @@ import ( "net/http" "strconv" - cfg "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/http/base/rpc" + cfg "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/http/base/rpc" ) const ( diff --git a/http/nodeinfo/prom.go b/http/nodeinfo/prom.go index 7eee33346a..609fa6e86f 100644 --- a/http/nodeinfo/prom.go +++ b/http/nodeinfo/prom.go @@ -21,11 +21,11 @@ package nodeinfo import ( "time" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/p2pserver/net/netserver" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/protocols" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/p2pserver/net/netserver" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/protocols" prom "github.com/prometheus/client_golang/prometheus" ) diff --git a/http/nodeinfo/server.go b/http/nodeinfo/server.go index abf2ac2736..d2ed87fd71 100644 --- a/http/nodeinfo/server.go +++ b/http/nodeinfo/server.go @@ -26,9 +26,9 @@ import ( "sort" "strconv" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/ledger" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/ledger" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/http/restful/restful/server.go b/http/restful/restful/server.go index f8a937d91c..1a05cee33b 100644 --- a/http/restful/restful/server.go +++ b/http/restful/restful/server.go @@ -31,11 +31,11 @@ import ( "sync" "time" - cfg "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/http/base/common" - berr "github.com/ontio/ontology/http/base/error" - "github.com/ontio/ontology/http/base/rest" + cfg "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/http/base/common" + berr "github.com/ontio/ontology/v2/http/base/error" + "github.com/ontio/ontology/v2/http/base/rest" "golang.org/x/net/netutil" ) diff --git a/http/restful/server.go b/http/restful/server.go index 10330cf4f8..3383564b62 100644 --- a/http/restful/server.go +++ b/http/restful/server.go @@ -20,7 +20,7 @@ package restful import ( - "github.com/ontio/ontology/http/restful/restful" + "github.com/ontio/ontology/v2/http/restful/restful" ) //start restful diff --git a/http/test/func_test.go b/http/test/func_test.go index fe33657c13..82a3f8aeaa 100644 --- a/http/test/func_test.go +++ b/http/test/func_test.go @@ -25,10 +25,10 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/merkle" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/merkle" + "github.com/ontio/ontology/v2/vm/neovm" "github.com/stretchr/testify/assert" ) diff --git a/http/websocket/server.go b/http/websocket/server.go index c077cb17fc..e1b1a39690 100644 --- a/http/websocket/server.go +++ b/http/websocket/server.go @@ -20,17 +20,17 @@ package websocket import ( - "github.com/ontio/ontology/common" - cfg "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/events/message" - bactor "github.com/ontio/ontology/http/base/actor" - bcomn "github.com/ontio/ontology/http/base/common" - Err "github.com/ontio/ontology/http/base/error" - "github.com/ontio/ontology/http/base/rest" - "github.com/ontio/ontology/http/websocket/websocket" - "github.com/ontio/ontology/smartcontract/event" + "github.com/ontio/ontology/v2/common" + cfg "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/events/message" + bactor "github.com/ontio/ontology/v2/http/base/actor" + bcomn "github.com/ontio/ontology/v2/http/base/common" + Err "github.com/ontio/ontology/v2/http/base/error" + "github.com/ontio/ontology/v2/http/base/rest" + "github.com/ontio/ontology/v2/http/websocket/websocket" + "github.com/ontio/ontology/v2/smartcontract/event" ) var ws *websocket.WsServer diff --git a/http/websocket/session/session.go b/http/websocket/session/session.go index 4f4af8af19..b877c5fc86 100644 --- a/http/websocket/session/session.go +++ b/http/websocket/session/session.go @@ -24,7 +24,7 @@ import ( "time" "github.com/gorilla/websocket" - cfg "github.com/ontio/ontology/common/config" + cfg "github.com/ontio/ontology/v2/common/config" "github.com/pborman/uuid" ) diff --git a/http/websocket/websocket/server.go b/http/websocket/websocket/server.go index d0a060b60b..72a7142c14 100644 --- a/http/websocket/websocket/server.go +++ b/http/websocket/websocket/server.go @@ -30,12 +30,12 @@ import ( "time" "github.com/gorilla/websocket" - "github.com/ontio/ontology/common" - cfg "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - Err "github.com/ontio/ontology/http/base/error" - "github.com/ontio/ontology/http/base/rest" - "github.com/ontio/ontology/http/websocket/session" + "github.com/ontio/ontology/v2/common" + cfg "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + Err "github.com/ontio/ontology/v2/http/base/error" + "github.com/ontio/ontology/v2/http/base/rest" + "github.com/ontio/ontology/v2/http/websocket/session" ) const ( diff --git a/main.go b/main.go index be637ce7c9..e5b971ded9 100644 --- a/main.go +++ b/main.go @@ -32,32 +32,32 @@ import ( "github.com/ethereum/go-ethereum/common/fdlimit" "github.com/ontio/ontology-crypto/keypair" alog "github.com/ontio/ontology-eventbus/log" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd" - cmdcom "github.com/ontio/ontology/cmd/common" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/consensus" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/events" - bactor "github.com/ontio/ontology/http/base/actor" - hserver "github.com/ontio/ontology/http/base/actor" - "github.com/ontio/ontology/http/jsonrpc" - "github.com/ontio/ontology/http/localrpc" - "github.com/ontio/ontology/http/nodeinfo" - "github.com/ontio/ontology/http/restful" - "github.com/ontio/ontology/http/websocket" - "github.com/ontio/ontology/p2pserver" - netreqactor "github.com/ontio/ontology/p2pserver/actor/req" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/txnpool" - tc "github.com/ontio/ontology/txnpool/common" - "github.com/ontio/ontology/txnpool/proc" - "github.com/ontio/ontology/validator/stateful" - "github.com/ontio/ontology/validator/stateless" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd" + cmdcom "github.com/ontio/ontology/v2/cmd/common" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/consensus" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/events" + bactor "github.com/ontio/ontology/v2/http/base/actor" + hserver "github.com/ontio/ontology/v2/http/base/actor" + "github.com/ontio/ontology/v2/http/jsonrpc" + "github.com/ontio/ontology/v2/http/localrpc" + "github.com/ontio/ontology/v2/http/nodeinfo" + "github.com/ontio/ontology/v2/http/restful" + "github.com/ontio/ontology/v2/http/websocket" + "github.com/ontio/ontology/v2/p2pserver" + netreqactor "github.com/ontio/ontology/v2/p2pserver/actor/req" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/txnpool" + tc "github.com/ontio/ontology/v2/txnpool/common" + "github.com/ontio/ontology/v2/txnpool/proc" + "github.com/ontio/ontology/v2/validator/stateful" + "github.com/ontio/ontology/v2/validator/stateless" "github.com/urfave/cli" ) diff --git a/merkle/file_hash_store.go b/merkle/file_hash_store.go index e2ff50f8a1..f6facc01b5 100644 --- a/merkle/file_hash_store.go +++ b/merkle/file_hash_store.go @@ -23,7 +23,7 @@ import ( "io" "os" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) // HashStore is an interface for persist hash diff --git a/merkle/merkle_hasher.go b/merkle/merkle_hasher.go index 7186397c7c..145bc11b60 100644 --- a/merkle/merkle_hasher.go +++ b/merkle/merkle_hasher.go @@ -25,7 +25,7 @@ import ( "fmt" "math" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) const ( diff --git a/merkle/merkle_tree.go b/merkle/merkle_tree.go index 80a275298f..7db50f1bbd 100644 --- a/merkle/merkle_tree.go +++ b/merkle/merkle_tree.go @@ -23,8 +23,8 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) // const UINT256_SIZE int = 32 diff --git a/merkle/merkle_tree_test.go b/merkle/merkle_tree_test.go index 47ee93573a..6c21df9c9b 100644 --- a/merkle/merkle_tree_test.go +++ b/merkle/merkle_tree_test.go @@ -23,7 +23,7 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/actor/req/txnpool.go b/p2pserver/actor/req/txnpool.go index 641588f5d2..fdbed79f33 100644 --- a/p2pserver/actor/req/txnpool.go +++ b/p2pserver/actor/req/txnpool.go @@ -20,9 +20,9 @@ package req import ( "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - tc "github.com/ontio/ontology/txnpool/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + tc "github.com/ontio/ontology/v2/txnpool/common" ) var txnPoolPid *actor.PID diff --git a/p2pserver/common/id.go b/p2pserver/common/id.go index a9e680101a..ef48cbc535 100644 --- a/p2pserver/common/id.go +++ b/p2pserver/common/id.go @@ -30,9 +30,9 @@ import ( "math/bits" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" ) var Difficulty = 18 //bit diff --git a/p2pserver/common/logger.go b/p2pserver/common/logger.go index 850ab8b890..5daa95c177 100644 --- a/p2pserver/common/logger.go +++ b/p2pserver/common/logger.go @@ -18,7 +18,7 @@ package common -import "github.com/ontio/ontology/common/log" +import "github.com/ontio/ontology/v2/common/log" type Logger interface { Debug(a ...interface{}) diff --git a/p2pserver/connect_controller/connect_controller.go b/p2pserver/connect_controller/connect_controller.go index b1b6de760a..543cb2985d 100644 --- a/p2pserver/connect_controller/connect_controller.go +++ b/p2pserver/connect_controller/connect_controller.go @@ -25,9 +25,9 @@ import ( "sync" "sync/atomic" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/handshake" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/handshake" + "github.com/ontio/ontology/v2/p2pserver/peer" "github.com/scylladb/go-set/strset" ) diff --git a/p2pserver/connect_controller/connect_controller_test.go b/p2pserver/connect_controller/connect_controller_test.go index 3be8febf8b..05b6f3477c 100644 --- a/p2pserver/connect_controller/connect_controller_test.go +++ b/p2pserver/connect_controller/connect_controller_test.go @@ -24,9 +24,9 @@ import ( "testing" "time" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/handshake" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/handshake" + "github.com/ontio/ontology/v2/p2pserver/peer" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/connect_controller/connection.go b/p2pserver/connect_controller/connection.go index 14a1e6f94f..0613811a00 100644 --- a/p2pserver/connect_controller/connection.go +++ b/p2pserver/connect_controller/connection.go @@ -20,7 +20,7 @@ package connect_controller import ( "net" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) // Conn is a net.Conn wrapper to do some clean up when Close. diff --git a/p2pserver/connect_controller/control_option.go b/p2pserver/connect_controller/control_option.go index 58f7a6adb4..4daf245e52 100644 --- a/p2pserver/connect_controller/control_option.go +++ b/p2pserver/connect_controller/control_option.go @@ -18,8 +18,8 @@ package connect_controller import ( - "github.com/ontio/ontology/common/config" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/common/config" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" ) type ConnCtrlOption struct { diff --git a/p2pserver/connect_controller/transport.go b/p2pserver/connect_controller/transport.go index bf5d8dc5ec..669b9d5487 100644 --- a/p2pserver/connect_controller/transport.go +++ b/p2pserver/connect_controller/transport.go @@ -27,8 +27,8 @@ import ( "strconv" "time" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Dialer interface { diff --git a/p2pserver/dht/dht.go b/p2pserver/dht/dht.go index 942f7f3baa..21f8377255 100644 --- a/p2pserver/dht/dht.go +++ b/p2pserver/dht/dht.go @@ -21,9 +21,9 @@ package dht import ( "time" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - kb "github.com/ontio/ontology/p2pserver/dht/kbucket" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + kb "github.com/ontio/ontology/v2/p2pserver/dht/kbucket" ) // Pool size is the number of nodes used for group find/set RPC calls diff --git a/p2pserver/dht/dht_test.go b/p2pserver/dht/dht_test.go index 0e827fb706..442490633e 100644 --- a/p2pserver/dht/dht_test.go +++ b/p2pserver/dht/dht_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/dht/kbucket/bucket.go b/p2pserver/dht/kbucket/bucket.go index 66661c502b..fa516d2285 100644 --- a/p2pserver/dht/kbucket/bucket.go +++ b/p2pserver/dht/kbucket/bucket.go @@ -22,7 +22,7 @@ import ( "container/list" "sync" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) // Bucket holds a list of peers. diff --git a/p2pserver/dht/kbucket/sorting.go b/p2pserver/dht/kbucket/sorting.go index deedd1cea6..b9556f0dda 100644 --- a/p2pserver/dht/kbucket/sorting.go +++ b/p2pserver/dht/kbucket/sorting.go @@ -23,7 +23,7 @@ import ( "container/list" "sort" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) // A helper struct to sort peers by their distance to the local node diff --git a/p2pserver/dht/kbucket/table.go b/p2pserver/dht/kbucket/table.go index 3c2654f145..0b1355f5c9 100644 --- a/p2pserver/dht/kbucket/table.go +++ b/p2pserver/dht/kbucket/table.go @@ -25,7 +25,7 @@ import ( "sync" "time" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) var ErrPeerRejectedHighLatency = errors.New("peer rejected; latency too high") diff --git a/p2pserver/dht/kbucket/table_test.go b/p2pserver/dht/kbucket/table_test.go index e7aeb4c24a..976d498f66 100644 --- a/p2pserver/dht/kbucket/table_test.go +++ b/p2pserver/dht/kbucket/table_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" "github.com/scylladb/go-set/strset" "github.com/stretchr/testify/require" ) diff --git a/p2pserver/handshake/handshake.go b/p2pserver/handshake/handshake.go index 84966ae2a3..26f2550fc1 100644 --- a/p2pserver/handshake/handshake.go +++ b/p2pserver/handshake/handshake.go @@ -23,10 +23,10 @@ import ( "time" "github.com/blang/semver" - common2 "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" - "github.com/ontio/ontology/p2pserver/peer" + common2 "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/peer" ) var HANDSHAKE_DURATION = 10 * time.Second // handshake time can not exceed this duration, or will treat as attack. diff --git a/p2pserver/handshake/handshake_test.go b/p2pserver/handshake/handshake_test.go index d24b26ddc2..6eed110162 100644 --- a/p2pserver/handshake/handshake_test.go +++ b/p2pserver/handshake/handshake_test.go @@ -24,9 +24,9 @@ import ( "testing" "time" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/peer" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/link/link.go b/p2pserver/link/link.go index 9bec107b53..97154ed19e 100644 --- a/p2pserver/link/link.go +++ b/p2pserver/link/link.go @@ -27,10 +27,10 @@ import ( "sync/atomic" "time" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" ) //Link used to establish diff --git a/p2pserver/link/link_test.go b/p2pserver/link/link_test.go index 2f2fb6b003..8af18760d0 100644 --- a/p2pserver/link/link_test.go +++ b/p2pserver/link/link_test.go @@ -24,11 +24,11 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - comm "github.com/ontio/ontology/common" - ct "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/p2pserver/common" - mt "github.com/ontio/ontology/p2pserver/message/types" + "github.com/ontio/ontology/v2/account" + comm "github.com/ontio/ontology/v2/common" + ct "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/p2pserver/common" + mt "github.com/ontio/ontology/v2/p2pserver/message/types" ) func TestUnpackBufNode(t *testing.T) { diff --git a/p2pserver/message/msg_pack/msg_pack.go b/p2pserver/message/msg_pack/msg_pack.go index c1e760c01c..18255a60b5 100644 --- a/p2pserver/message/msg_pack/msg_pack.go +++ b/p2pserver/message/msg_pack/msg_pack.go @@ -19,11 +19,11 @@ package msgpack import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - ct "github.com/ontio/ontology/core/types" - msgCommon "github.com/ontio/ontology/p2pserver/common" - mt "github.com/ontio/ontology/p2pserver/message/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + ct "github.com/ontio/ontology/v2/core/types" + msgCommon "github.com/ontio/ontology/v2/p2pserver/common" + mt "github.com/ontio/ontology/v2/p2pserver/message/types" ) //Peer address package diff --git a/p2pserver/message/types/address.go b/p2pserver/message/types/address.go index 134ed1622b..3623043b99 100644 --- a/p2pserver/message/types/address.go +++ b/p2pserver/message/types/address.go @@ -21,8 +21,8 @@ package types import ( "io" - "github.com/ontio/ontology/common" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type Addr struct { diff --git a/p2pserver/message/types/address_req.go b/p2pserver/message/types/address_req.go index 5385ab7ded..b0af0a7dee 100644 --- a/p2pserver/message/types/address_req.go +++ b/p2pserver/message/types/address_req.go @@ -19,8 +19,8 @@ package types import ( - "github.com/ontio/ontology/common" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type AddrReq struct{} diff --git a/p2pserver/message/types/address_test.go b/p2pserver/message/types/address_test.go index 2f87287687..148a15661f 100644 --- a/p2pserver/message/types/address_test.go +++ b/p2pserver/message/types/address_test.go @@ -22,8 +22,8 @@ import ( "net" "testing" - "github.com/ontio/ontology/common" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + comm "github.com/ontio/ontology/v2/p2pserver/common" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/message/types/block.go b/p2pserver/message/types/block.go index 453431887f..f427702e47 100644 --- a/p2pserver/message/types/block.go +++ b/p2pserver/message/types/block.go @@ -21,9 +21,9 @@ package types import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type Block struct { diff --git a/p2pserver/message/types/block_header.go b/p2pserver/message/types/block_header.go index 45c7bfff9a..45e48e09b2 100644 --- a/p2pserver/message/types/block_header.go +++ b/p2pserver/message/types/block_header.go @@ -22,9 +22,9 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - ct "github.com/ontio/ontology/core/types" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + ct "github.com/ontio/ontology/v2/core/types" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type BlkHeader struct { diff --git a/p2pserver/message/types/block_headers_req.go b/p2pserver/message/types/block_headers_req.go index 7946ccfd0c..32ddf4aa62 100644 --- a/p2pserver/message/types/block_headers_req.go +++ b/p2pserver/message/types/block_headers_req.go @@ -21,8 +21,8 @@ package types import ( "io" - "github.com/ontio/ontology/common" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type HeadersReq struct { diff --git a/p2pserver/message/types/block_headers_req_test.go b/p2pserver/message/types/block_headers_req_test.go index 8c612a99ca..f91afc4ed9 100644 --- a/p2pserver/message/types/block_headers_req_test.go +++ b/p2pserver/message/types/block_headers_req_test.go @@ -20,7 +20,7 @@ package types import ( "testing" - cm "github.com/ontio/ontology/common" + cm "github.com/ontio/ontology/v2/common" ) func TestBlkHdrReqSerializationDeserialization(t *testing.T) { diff --git a/p2pserver/message/types/blocks_req.go b/p2pserver/message/types/blocks_req.go index 0c0476ec31..5ea54a1894 100644 --- a/p2pserver/message/types/blocks_req.go +++ b/p2pserver/message/types/blocks_req.go @@ -21,8 +21,8 @@ package types import ( "io" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type BlocksReq struct { diff --git a/p2pserver/message/types/blocks_req_test.go b/p2pserver/message/types/blocks_req_test.go index 47e0f7c93a..d3545853d8 100644 --- a/p2pserver/message/types/blocks_req_test.go +++ b/p2pserver/message/types/blocks_req_test.go @@ -20,7 +20,7 @@ package types import ( "testing" - cm "github.com/ontio/ontology/common" + cm "github.com/ontio/ontology/v2/common" ) func TestBlkReqSerializationDeserialization(t *testing.T) { diff --git a/p2pserver/message/types/consensus.go b/p2pserver/message/types/consensus.go index b387587342..60e5dfe16e 100644 --- a/p2pserver/message/types/consensus.go +++ b/p2pserver/message/types/consensus.go @@ -19,8 +19,8 @@ package types import ( - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Consensus struct { diff --git a/p2pserver/message/types/consensus_payload.go b/p2pserver/message/types/consensus_payload.go index dc484ef759..8fd770307c 100644 --- a/p2pserver/message/types/consensus_payload.go +++ b/p2pserver/message/types/consensus_payload.go @@ -23,10 +23,10 @@ import ( "io" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/errors" - common2 "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/errors" + common2 "github.com/ontio/ontology/v2/p2pserver/common" ) type ConsensusPayload struct { diff --git a/p2pserver/message/types/data_req.go b/p2pserver/message/types/data_req.go index a683cd90be..fcc0d7cc20 100644 --- a/p2pserver/message/types/data_req.go +++ b/p2pserver/message/types/data_req.go @@ -21,8 +21,8 @@ package types import ( "io" - "github.com/ontio/ontology/common" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type DataReq struct { diff --git a/p2pserver/message/types/data_req_test.go b/p2pserver/message/types/data_req_test.go index 6b425098d0..c803a8e4f8 100644 --- a/p2pserver/message/types/data_req_test.go +++ b/p2pserver/message/types/data_req_test.go @@ -20,7 +20,7 @@ package types import ( "testing" - cm "github.com/ontio/ontology/common" + cm "github.com/ontio/ontology/v2/common" ) func TestDataReqSerializationDeserialization(t *testing.T) { diff --git a/p2pserver/message/types/find_node.go b/p2pserver/message/types/find_node.go index 49159827b2..aa46923ad4 100644 --- a/p2pserver/message/types/find_node.go +++ b/p2pserver/message/types/find_node.go @@ -21,8 +21,8 @@ package types import ( "io" - "github.com/ontio/ontology/common" - ncomm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + ncomm "github.com/ontio/ontology/v2/p2pserver/common" ) type FindNodeReq struct { diff --git a/p2pserver/message/types/find_node_test.go b/p2pserver/message/types/find_node_test.go index 03d704adc9..2fb3b90ca8 100644 --- a/p2pserver/message/types/find_node_test.go +++ b/p2pserver/message/types/find_node_test.go @@ -20,7 +20,7 @@ package types import ( "testing" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) func TestFindNodeRequest(t *testing.T) { diff --git a/p2pserver/message/types/inventory.go b/p2pserver/message/types/inventory.go index 13250ef3be..fd3c5f872a 100644 --- a/p2pserver/message/types/inventory.go +++ b/p2pserver/message/types/inventory.go @@ -21,8 +21,8 @@ package types import ( "io" - "github.com/ontio/ontology/common" - p2pCommon "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + p2pCommon "github.com/ontio/ontology/v2/p2pserver/common" ) var LastInvHash common.Uint256 diff --git a/p2pserver/message/types/message.go b/p2pserver/message/types/message.go index ad16055650..7e227cdccb 100644 --- a/p2pserver/message/types/message.go +++ b/p2pserver/message/types/message.go @@ -23,9 +23,9 @@ import ( "fmt" "io" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Message interface { diff --git a/p2pserver/message/types/message_test.go b/p2pserver/message/types/message_test.go index 814c679229..45f2b68b34 100644 --- a/p2pserver/message/types/message_test.go +++ b/p2pserver/message/types/message_test.go @@ -23,8 +23,8 @@ import ( "io" "testing" - common2 "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + common2 "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/message/types/notfound.go b/p2pserver/message/types/notfound.go index 8cb6af5593..de677c1f9c 100644 --- a/p2pserver/message/types/notfound.go +++ b/p2pserver/message/types/notfound.go @@ -21,8 +21,8 @@ package types import ( "io" - "github.com/ontio/ontology/common" - comm "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/common" + comm "github.com/ontio/ontology/v2/p2pserver/common" ) type NotFound struct { diff --git a/p2pserver/message/types/notfound_test.go b/p2pserver/message/types/notfound_test.go index 2eed2b27ab..3a28e92507 100644 --- a/p2pserver/message/types/notfound_test.go +++ b/p2pserver/message/types/notfound_test.go @@ -21,7 +21,7 @@ package types import ( "testing" - cm "github.com/ontio/ontology/common" + cm "github.com/ontio/ontology/v2/common" ) func Uint256ParseFromBytes(f []byte) cm.Uint256 { diff --git a/p2pserver/message/types/ping.go b/p2pserver/message/types/ping.go index 357d329742..c86cce07fe 100644 --- a/p2pserver/message/types/ping.go +++ b/p2pserver/message/types/ping.go @@ -21,8 +21,8 @@ package types import ( "io" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Ping struct { diff --git a/p2pserver/message/types/pong.go b/p2pserver/message/types/pong.go index e8a71dcd2a..add5f372bc 100644 --- a/p2pserver/message/types/pong.go +++ b/p2pserver/message/types/pong.go @@ -21,8 +21,8 @@ package types import ( "io" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Pong struct { diff --git a/p2pserver/message/types/subnet.go b/p2pserver/message/types/subnet.go index 7c65995355..41c98b97d4 100644 --- a/p2pserver/message/types/subnet.go +++ b/p2pserver/message/types/subnet.go @@ -24,10 +24,10 @@ import ( "time" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/account" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/p2pserver/common" ) type SubnetMembersRequest struct { diff --git a/p2pserver/message/types/transaction.go b/p2pserver/message/types/transaction.go index bdc5c68906..86f3b2c914 100644 --- a/p2pserver/message/types/transaction.go +++ b/p2pserver/message/types/transaction.go @@ -19,9 +19,9 @@ package types import ( - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/p2pserver/common" ) // Transaction message diff --git a/p2pserver/message/types/update_kadid.go b/p2pserver/message/types/update_kadid.go index d68605c3bc..f7d0a5eda0 100644 --- a/p2pserver/message/types/update_kadid.go +++ b/p2pserver/message/types/update_kadid.go @@ -19,8 +19,8 @@ package types import ( - common2 "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + common2 "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type UpdatePeerKeyId struct { diff --git a/p2pserver/message/types/verack.go b/p2pserver/message/types/verack.go index ee3ebca292..11c67d5852 100644 --- a/p2pserver/message/types/verack.go +++ b/p2pserver/message/types/verack.go @@ -21,8 +21,8 @@ package types import ( "io" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type VerACK struct { diff --git a/p2pserver/message/types/version.go b/p2pserver/message/types/version.go index 17c9a8302b..30d94c4edd 100644 --- a/p2pserver/message/types/version.go +++ b/p2pserver/message/types/version.go @@ -21,8 +21,8 @@ package types import ( "io" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type VersionPayload struct { diff --git a/p2pserver/mock/dialer.go b/p2pserver/mock/dialer.go index 5b6a1db410..5e10915b71 100644 --- a/p2pserver/mock/dialer.go +++ b/p2pserver/mock/dialer.go @@ -22,8 +22,8 @@ import ( "errors" "net" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/connect_controller" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/connect_controller" ) type dialer struct { diff --git a/p2pserver/mock/discovery_test.go b/p2pserver/mock/discovery_test.go index 8727f25a3e..0a319e1857 100644 --- a/p2pserver/mock/discovery_test.go +++ b/p2pserver/mock/discovery_test.go @@ -22,16 +22,16 @@ import ( "testing" "time" - "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" - "github.com/ontio/ontology/p2pserver/peer" - "github.com/ontio/ontology/p2pserver/protocols/bootstrap" - "github.com/ontio/ontology/p2pserver/protocols/discovery" - "github.com/ontio/ontology/p2pserver/protocols/utils" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" + msgTypes "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/net/netserver" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/protocols/bootstrap" + "github.com/ontio/ontology/v2/p2pserver/protocols/discovery" + "github.com/ontio/ontology/v2/p2pserver/protocols/utils" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/mock/interface.go b/p2pserver/mock/interface.go index 1a48938d55..bfc38105cb 100644 --- a/p2pserver/mock/interface.go +++ b/p2pserver/mock/interface.go @@ -22,11 +22,11 @@ import ( "net" "strconv" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/connect_controller" - "github.com/ontio/ontology/p2pserver/net/netserver" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/connect_controller" + "github.com/ontio/ontology/v2/p2pserver/net/netserver" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" ) type Network interface { diff --git a/p2pserver/mock/listener.go b/p2pserver/mock/listener.go index a6a5e43628..b92998e4ac 100644 --- a/p2pserver/mock/listener.go +++ b/p2pserver/mock/listener.go @@ -22,7 +22,7 @@ import ( "errors" "net" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) type Listener struct { diff --git a/p2pserver/mock/mocknet.go b/p2pserver/mock/mocknet.go index 208e97ed1b..325496d823 100644 --- a/p2pserver/mock/mocknet.go +++ b/p2pserver/mock/mocknet.go @@ -26,7 +26,7 @@ import ( "sync" "sync/atomic" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" ) func init() { diff --git a/p2pserver/mock/mocknet_test.go b/p2pserver/mock/mocknet_test.go index b0e970e5dd..1177eebb2b 100644 --- a/p2pserver/mock/mocknet_test.go +++ b/p2pserver/mock/mocknet_test.go @@ -25,7 +25,7 @@ import ( "net" - "github.com/ontio/ontology/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/p2pserver/mock/reserved_test.go b/p2pserver/mock/reserved_test.go index f039b586c3..ae72f62115 100644 --- a/p2pserver/mock/reserved_test.go +++ b/p2pserver/mock/reserved_test.go @@ -23,11 +23,11 @@ import ( "testing" "time" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/net/netserver" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/net/netserver" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/mock/subnet_test.go b/p2pserver/mock/subnet_test.go index dec8f9200a..195f1c4f7d 100644 --- a/p2pserver/mock/subnet_test.go +++ b/p2pserver/mock/subnet_test.go @@ -22,19 +22,19 @@ import ( "testing" "time" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/p2pserver/common" - msgTypes "github.com/ontio/ontology/p2pserver/message/types" - "github.com/ontio/ontology/p2pserver/net/netserver" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" - "github.com/ontio/ontology/p2pserver/protocols/bootstrap" - "github.com/ontio/ontology/p2pserver/protocols/discovery" - "github.com/ontio/ontology/p2pserver/protocols/subnet" - "github.com/ontio/ontology/p2pserver/protocols/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/p2pserver/common" + msgTypes "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/net/netserver" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/protocols/bootstrap" + "github.com/ontio/ontology/v2/p2pserver/protocols/discovery" + "github.com/ontio/ontology/v2/p2pserver/protocols/subnet" + "github.com/ontio/ontology/v2/p2pserver/protocols/utils" "github.com/stretchr/testify/assert" ) diff --git a/p2pserver/net/netserver/nbr_peers.go b/p2pserver/net/netserver/nbr_peers.go index cb09bde876..fd9b7bb933 100644 --- a/p2pserver/net/netserver/nbr_peers.go +++ b/p2pserver/net/netserver/nbr_peers.go @@ -23,10 +23,10 @@ import ( "sync" "sync/atomic" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" - "github.com/ontio/ontology/p2pserver/peer" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/peer" ) // Conn is a net.Conn wrapper to do some clean up when Close. diff --git a/p2pserver/net/netserver/netserver.go b/p2pserver/net/netserver/netserver.go index 0c931affe0..94e70901f9 100644 --- a/p2pserver/net/netserver/netserver.go +++ b/p2pserver/net/netserver/netserver.go @@ -22,14 +22,14 @@ import ( "errors" "net" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/connect_controller" - "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" - "github.com/ontio/ontology/p2pserver/protocols" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/connect_controller" + "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/protocols" ) //NewNetServer return the net object in p2p diff --git a/p2pserver/net/protocol/protocol.go b/p2pserver/net/protocol/protocol.go index 4e29888bf1..08d25d68d5 100644 --- a/p2pserver/net/protocol/protocol.go +++ b/p2pserver/net/protocol/protocol.go @@ -18,8 +18,8 @@ package p2p import ( - "github.com/ontio/ontology/p2pserver/message/types" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/peer" ) type Context struct { diff --git a/p2pserver/net/protocol/server.go b/p2pserver/net/protocol/server.go index a0026e31a1..b987091253 100644 --- a/p2pserver/net/protocol/server.go +++ b/p2pserver/net/protocol/server.go @@ -20,9 +20,9 @@ package p2p import ( - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" + "github.com/ontio/ontology/v2/p2pserver/peer" ) //P2P represent the net interface of p2p package diff --git a/p2pserver/p2pserver.go b/p2pserver/p2pserver.go index 109d3f5069..5200e620f1 100644 --- a/p2pserver/p2pserver.go +++ b/p2pserver/p2pserver.go @@ -22,16 +22,16 @@ import ( "strings" "time" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/connect_controller" - "github.com/ontio/ontology/p2pserver/net/netserver" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/protocols" - "github.com/ontio/ontology/p2pserver/protocols/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/connect_controller" + "github.com/ontio/ontology/v2/p2pserver/net/netserver" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/protocols" + "github.com/ontio/ontology/v2/p2pserver/protocols/utils" ) //P2PServer control all network activities diff --git a/p2pserver/peer/peer.go b/p2pserver/peer/peer.go index f4239eadec..9960c8403f 100644 --- a/p2pserver/peer/peer.go +++ b/p2pserver/peer/peer.go @@ -27,11 +27,11 @@ import ( "sync" "time" - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - conn "github.com/ontio/ontology/p2pserver/link" - "github.com/ontio/ontology/p2pserver/message/types" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + conn "github.com/ontio/ontology/v2/p2pserver/link" + "github.com/ontio/ontology/v2/p2pserver/message/types" ) // PeerInfo provides the basic information of a peer diff --git a/p2pserver/protocols/block_sync/block_sync.go b/p2pserver/protocols/block_sync/block_sync.go index 8b14fb1d6f..b0c5e553bf 100644 --- a/p2pserver/protocols/block_sync/block_sync.go +++ b/p2pserver/protocols/block_sync/block_sync.go @@ -24,14 +24,14 @@ import ( "sync" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/types" - p2pComm "github.com/ontio/ontology/p2pserver/common" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/types" + p2pComm "github.com/ontio/ontology/v2/p2pserver/common" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" ) const ( diff --git a/p2pserver/protocols/bootstrap/bootstrap.go b/p2pserver/protocols/bootstrap/bootstrap.go index 59adf120dc..2ebbfc57b8 100644 --- a/p2pserver/protocols/bootstrap/bootstrap.go +++ b/p2pserver/protocols/bootstrap/bootstrap.go @@ -22,12 +22,12 @@ import ( "sync/atomic" "time" - "github.com/ontio/ontology/p2pserver/common" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" - "github.com/ontio/ontology/p2pserver/protocols/utils" + "github.com/ontio/ontology/v2/p2pserver/common" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/protocols/utils" ) const activeConnect = 4 // when connection num less than this value, we connect seeds node actively. diff --git a/p2pserver/protocols/discovery/discovery.go b/p2pserver/protocols/discovery/discovery.go index deb2c21f90..66a3e5aabe 100644 --- a/p2pserver/protocols/discovery/discovery.go +++ b/p2pserver/protocols/discovery/discovery.go @@ -23,13 +23,13 @@ import ( "strconv" "time" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/dht" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/dht" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" "github.com/scylladb/go-set/strset" ) diff --git a/p2pserver/protocols/heatbeat/heartbeat.go b/p2pserver/protocols/heatbeat/heartbeat.go index 0cc77098b8..56c4d177b7 100644 --- a/p2pserver/protocols/heatbeat/heartbeat.go +++ b/p2pserver/protocols/heatbeat/heartbeat.go @@ -20,13 +20,13 @@ package heatbeat import ( "time" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/p2pserver/common" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/p2pserver/common" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" ) type HeartBeat struct { diff --git a/p2pserver/protocols/msg_handler.go b/p2pserver/protocols/msg_handler.go index 8ae9106937..ae15f196a6 100644 --- a/p2pserver/protocols/msg_handler.go +++ b/p2pserver/protocols/msg_handler.go @@ -23,25 +23,25 @@ import ( "fmt" lru "github.com/hashicorp/golang-lru" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/types" - actor "github.com/ontio/ontology/p2pserver/actor/req" - msgCommon "github.com/ontio/ontology/p2pserver/common" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - msgTypes "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/protocols/block_sync" - "github.com/ontio/ontology/p2pserver/protocols/bootstrap" - "github.com/ontio/ontology/p2pserver/protocols/discovery" - "github.com/ontio/ontology/p2pserver/protocols/heatbeat" - "github.com/ontio/ontology/p2pserver/protocols/recent_peers" - "github.com/ontio/ontology/p2pserver/protocols/reconnect" - "github.com/ontio/ontology/p2pserver/protocols/subnet" - "github.com/ontio/ontology/p2pserver/protocols/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/types" + actor "github.com/ontio/ontology/v2/p2pserver/actor/req" + msgCommon "github.com/ontio/ontology/v2/p2pserver/common" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + msgTypes "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/protocols/block_sync" + "github.com/ontio/ontology/v2/p2pserver/protocols/bootstrap" + "github.com/ontio/ontology/v2/p2pserver/protocols/discovery" + "github.com/ontio/ontology/v2/p2pserver/protocols/heatbeat" + "github.com/ontio/ontology/v2/p2pserver/protocols/recent_peers" + "github.com/ontio/ontology/v2/p2pserver/protocols/reconnect" + "github.com/ontio/ontology/v2/p2pserver/protocols/subnet" + "github.com/ontio/ontology/v2/p2pserver/protocols/utils" ) //respCache cache for some response data diff --git a/p2pserver/protocols/recent_peers/recent_peers.go b/p2pserver/protocols/recent_peers/recent_peers.go index 434593b519..b51d042196 100644 --- a/p2pserver/protocols/recent_peers/recent_peers.go +++ b/p2pserver/protocols/recent_peers/recent_peers.go @@ -24,11 +24,11 @@ import ( "sync" "time" - common2 "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" + common2 "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" ) type PersistRecentPeerService struct { diff --git a/p2pserver/protocols/reconnect/reconnect.go b/p2pserver/protocols/reconnect/reconnect.go index d7e43baa8e..3400706994 100644 --- a/p2pserver/protocols/reconnect/reconnect.go +++ b/p2pserver/protocols/reconnect/reconnect.go @@ -23,11 +23,11 @@ import ( "sync" "time" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/p2pserver/common" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/p2pserver/common" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" ) type ReconnectPeerInfo struct { diff --git a/p2pserver/protocols/subnet/subnet.go b/p2pserver/protocols/subnet/subnet.go index d455aed295..59a9edeaad 100644 --- a/p2pserver/protocols/subnet/subnet.go +++ b/p2pserver/protocols/subnet/subnet.go @@ -25,13 +25,13 @@ import ( "sync/atomic" "time" - "github.com/ontio/ontology/account" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/p2pserver/common" - "github.com/ontio/ontology/p2pserver/message/types" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - "github.com/ontio/ontology/p2pserver/peer" - "github.com/ontio/ontology/p2pserver/protocols/utils" + "github.com/ontio/ontology/v2/account" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/p2pserver/common" + "github.com/ontio/ontology/v2/p2pserver/message/types" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + "github.com/ontio/ontology/v2/p2pserver/peer" + "github.com/ontio/ontology/v2/p2pserver/protocols/utils" ) const MaxMemberRequests = 3 diff --git a/p2pserver/protocols/utils/govnode_resolver.go b/p2pserver/protocols/utils/govnode_resolver.go index dc20ffb5aa..f795f5b5bc 100644 --- a/p2pserver/protocols/utils/govnode_resolver.go +++ b/p2pserver/protocols/utils/govnode_resolver.go @@ -26,13 +26,13 @@ import ( "unsafe" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "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/ledger" - "github.com/ontio/ontology/smartcontract/service/native/governance" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/smartcontract/service/native/governance" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const GovNodeCacheTime = time.Minute * 10 diff --git a/smartcontract/context/context.go b/smartcontract/context/context.go index 69eaa5a49f..905e445f97 100644 --- a/smartcontract/context/context.go +++ b/smartcontract/context/context.go @@ -19,9 +19,9 @@ package context import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/event" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/event" ) // ContextRef is a interface of smart context diff --git a/smartcontract/event/event.go b/smartcontract/event/event.go index a548c19fcb..d1315a40d9 100644 --- a/smartcontract/event/event.go +++ b/smartcontract/event/event.go @@ -19,10 +19,10 @@ package event import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" ) const ( diff --git a/smartcontract/event/log_event_args.go b/smartcontract/event/log_event_args.go index a7de2aaeaa..f1f54b3302 100644 --- a/smartcontract/event/log_event_args.go +++ b/smartcontract/event/log_event_args.go @@ -19,7 +19,7 @@ package event import ( - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) // LogEventArgs describe smart contract event log struct diff --git a/smartcontract/event/notify_event_args.go b/smartcontract/event/notify_event_args.go index 32270b6d9f..b49b9804a4 100644 --- a/smartcontract/event/notify_event_args.go +++ b/smartcontract/event/notify_event_args.go @@ -19,7 +19,7 @@ package event import ( - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) const ( diff --git a/smartcontract/service/native/auth/auth.go b/smartcontract/service/native/auth/auth.go index ab17128517..c741e5d2c7 100644 --- a/smartcontract/service/native/auth/auth.go +++ b/smartcontract/service/native/auth/auth.go @@ -23,11 +23,11 @@ import ( "fmt" "time" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) var ( diff --git a/smartcontract/service/native/auth/param.go b/smartcontract/service/native/auth/param.go index 9c54ba7aaf..f734cdc6d7 100644 --- a/smartcontract/service/native/auth/param.go +++ b/smartcontract/service/native/auth/param.go @@ -23,8 +23,8 @@ import ( "io" "math" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) /* ********************************************** */ diff --git a/smartcontract/service/native/auth/param_test.go b/smartcontract/service/native/auth/param_test.go index 2a10e2e268..55968afa8f 100644 --- a/smartcontract/service/native/auth/param_test.go +++ b/smartcontract/service/native/auth/param_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) var ( diff --git a/smartcontract/service/native/auth/state.go b/smartcontract/service/native/auth/state.go index d93abb7fba..dad3cd2fee 100644 --- a/smartcontract/service/native/auth/state.go +++ b/smartcontract/service/native/auth/state.go @@ -22,8 +22,8 @@ import ( "io" "strings" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) /* diff --git a/smartcontract/service/native/auth/state_test.go b/smartcontract/service/native/auth/state_test.go index a43b0653d5..a01beea1f4 100644 --- a/smartcontract/service/native/auth/state_test.go +++ b/smartcontract/service/native/auth/state_test.go @@ -22,7 +22,7 @@ import ( "bytes" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) func TestSerRoleFuncs(t *testing.T) { diff --git a/smartcontract/service/native/auth/utils.go b/smartcontract/service/native/auth/utils.go index 307762e97e..c14516f389 100644 --- a/smartcontract/service/native/auth/utils.go +++ b/smartcontract/service/native/auth/utils.go @@ -22,10 +22,10 @@ import ( "fmt" "sort" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) var ( diff --git a/smartcontract/service/native/cross_chain/common/common.go b/smartcontract/service/native/cross_chain/common/common.go index 844312fd4b..10b485c4e1 100644 --- a/smartcontract/service/native/cross_chain/common/common.go +++ b/smartcontract/service/native/cross_chain/common/common.go @@ -21,13 +21,13 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - ctypes "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/neovm" - ntypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + ctypes "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" + ntypes "github.com/ontio/ontology/v2/vm/neovm/types" ) func CrossChainNeoVMCall(this *native.NativeService, address common.Address, method string, args []byte, diff --git a/smartcontract/service/native/cross_chain/common/header.go b/smartcontract/service/native/cross_chain/common/header.go index a36e7ceb8d..e1a690f83d 100644 --- a/smartcontract/service/native/cross_chain/common/header.go +++ b/smartcontract/service/native/cross_chain/common/header.go @@ -24,7 +24,7 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) const ( diff --git a/smartcontract/service/native/cross_chain/common/states.go b/smartcontract/service/native/cross_chain/common/states.go index 38ad7ef89e..32c5818e2b 100644 --- a/smartcontract/service/native/cross_chain/common/states.go +++ b/smartcontract/service/native/cross_chain/common/states.go @@ -20,7 +20,7 @@ package common import ( "fmt" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type ToMerkleValue struct { diff --git a/smartcontract/service/native/cross_chain/cross_chain_manager/cross_chain.go b/smartcontract/service/native/cross_chain/cross_chain_manager/cross_chain.go index 85d90374ba..a271a47b17 100644 --- a/smartcontract/service/native/cross_chain/cross_chain_manager/cross_chain.go +++ b/smartcontract/service/native/cross_chain/cross_chain_manager/cross_chain.go @@ -24,12 +24,12 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - ccom "github.com/ontio/ontology/smartcontract/service/native/cross_chain/common" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + ccom "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/header_sync" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/vm/neovm/types" ) const ( diff --git a/smartcontract/service/native/cross_chain/cross_chain_manager/param.go b/smartcontract/service/native/cross_chain/cross_chain_manager/param.go index 5c9c5834a9..3f32bff5fc 100644 --- a/smartcontract/service/native/cross_chain/cross_chain_manager/param.go +++ b/smartcontract/service/native/cross_chain/cross_chain_manager/param.go @@ -21,8 +21,8 @@ package cross_chain_manager import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type CreateCrossChainTxParam struct { diff --git a/smartcontract/service/native/cross_chain/cross_chain_manager/test/cross_chain_test.go b/smartcontract/service/native/cross_chain/cross_chain_manager/test/cross_chain_test.go index 590f8ed3e9..d5ef1ad752 100644 --- a/smartcontract/service/native/cross_chain/cross_chain_manager/test/cross_chain_test.go +++ b/smartcontract/service/native/cross_chain/cross_chain_manager/test/cross_chain_test.go @@ -24,25 +24,25 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/smartcontract/context" - "github.com/ontio/ontology/smartcontract/service/native" - ccom "github.com/ontio/ontology/smartcontract/service/native/cross_chain/common" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/cross_chain_manager" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/smartcontract/context" + "github.com/ontio/ontology/v2/smartcontract/service/native" + ccom "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/cross_chain_manager" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/header_sync" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/storage" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/cross_chain/cross_chain_manager/test/param_test.go b/smartcontract/service/native/cross_chain/cross_chain_manager/test/param_test.go index 7853f62272..795a5b6b54 100644 --- a/smartcontract/service/native/cross_chain/cross_chain_manager/test/param_test.go +++ b/smartcontract/service/native/cross_chain/cross_chain_manager/test/param_test.go @@ -21,8 +21,8 @@ package test import ( "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/cross_chain_manager" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/cross_chain_manager" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/cross_chain/cross_chain_manager/utils.go b/smartcontract/service/native/cross_chain/cross_chain_manager/utils.go index abe7a479f2..b9495b66fc 100644 --- a/smartcontract/service/native/cross_chain/cross_chain_manager/utils.go +++ b/smartcontract/service/native/cross_chain/cross_chain_manager/utils.go @@ -23,14 +23,14 @@ import ( "encoding/hex" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/merkle" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - ccom "github.com/ontio/ontology/smartcontract/service/native/cross_chain/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/merkle" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + ccom "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func putCrossChainID(native *native.NativeService, crossChainID uint64) error { diff --git a/smartcontract/service/native/cross_chain/header_sync/header_sync.go b/smartcontract/service/native/cross_chain/header_sync/header_sync.go index 7872448fb9..a4a51ddf81 100644 --- a/smartcontract/service/native/cross_chain/header_sync/header_sync.go +++ b/smartcontract/service/native/cross_chain/header_sync/header_sync.go @@ -21,11 +21,11 @@ package header_sync import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - ccom "github.com/ontio/ontology/smartcontract/service/native/cross_chain/common" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + ccom "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/cross_chain/header_sync/param.go b/smartcontract/service/native/cross_chain/header_sync/param.go index b7d2579982..27207fd9fa 100644 --- a/smartcontract/service/native/cross_chain/header_sync/param.go +++ b/smartcontract/service/native/cross_chain/header_sync/param.go @@ -21,8 +21,8 @@ package header_sync import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type SyncBlockHeaderParam struct { diff --git a/smartcontract/service/native/cross_chain/header_sync/states.go b/smartcontract/service/native/cross_chain/header_sync/states.go index 7144d29fea..5ba2e2820b 100644 --- a/smartcontract/service/native/cross_chain/header_sync/states.go +++ b/smartcontract/service/native/cross_chain/header_sync/states.go @@ -23,8 +23,8 @@ import ( "math" "sort" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type Peer struct { diff --git a/smartcontract/service/native/cross_chain/header_sync/test/header_sync_test.go b/smartcontract/service/native/cross_chain/header_sync/test/header_sync_test.go index 209f38ac05..14d738d88f 100644 --- a/smartcontract/service/native/cross_chain/header_sync/test/header_sync_test.go +++ b/smartcontract/service/native/cross_chain/header_sync/test/header_sync_test.go @@ -24,21 +24,21 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/smartcontract/service/native" - cccom "github.com/ontio/ontology/smartcontract/service/native/cross_chain/common" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/smartcontract/service/native" + cccom "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/header_sync" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/storage" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/cross_chain/header_sync/test/param_test.go b/smartcontract/service/native/cross_chain/header_sync/test/param_test.go index da75b97c93..5c9c2404d8 100644 --- a/smartcontract/service/native/cross_chain/header_sync/test/param_test.go +++ b/smartcontract/service/native/cross_chain/header_sync/test/param_test.go @@ -21,8 +21,8 @@ package test import ( "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/header_sync" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/cross_chain/header_sync/test/states_test.go b/smartcontract/service/native/cross_chain/header_sync/test/states_test.go index bc155cf6a5..58e5c2f2e1 100644 --- a/smartcontract/service/native/cross_chain/header_sync/test/states_test.go +++ b/smartcontract/service/native/cross_chain/header_sync/test/states_test.go @@ -21,8 +21,8 @@ package test import ( "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/header_sync" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/cross_chain/header_sync/utils.go b/smartcontract/service/native/cross_chain/header_sync/utils.go index 36f8969453..00ceebdd50 100644 --- a/smartcontract/service/native/cross_chain/header_sync/utils.go +++ b/smartcontract/service/native/cross_chain/header_sync/utils.go @@ -22,15 +22,15 @@ import ( "encoding/json" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - vconfig "github.com/ontio/ontology/consensus/vbft/config" - "github.com/ontio/ontology/core/signature" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - ccom "github.com/ontio/ontology/smartcontract/service/native/cross_chain/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + vconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + "github.com/ontio/ontology/v2/core/signature" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + ccom "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func PutBlockHeader(native *native.NativeService, blockHeader *ccom.Header, header []byte) error { diff --git a/smartcontract/service/native/cross_chain/lock_proxy/lock_proxy.go b/smartcontract/service/native/cross_chain/lock_proxy/lock_proxy.go index cddb003e6c..e243024105 100644 --- a/smartcontract/service/native/cross_chain/lock_proxy/lock_proxy.go +++ b/smartcontract/service/native/cross_chain/lock_proxy/lock_proxy.go @@ -24,16 +24,16 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/cross_chain_manager" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/cross_chain_manager" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func InitLockProxy() { diff --git a/smartcontract/service/native/cross_chain/lock_proxy/states.go b/smartcontract/service/native/cross_chain/lock_proxy/states.go index 14672fb080..b70cea3ed0 100644 --- a/smartcontract/service/native/cross_chain/lock_proxy/states.go +++ b/smartcontract/service/native/cross_chain/lock_proxy/states.go @@ -23,8 +23,8 @@ import ( "io" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) // Args for lock and unlock diff --git a/smartcontract/service/native/cross_chain/lock_proxy/states_test.go b/smartcontract/service/native/cross_chain/lock_proxy/states_test.go index 4b72dac390..3f9e3253f0 100644 --- a/smartcontract/service/native/cross_chain/lock_proxy/states_test.go +++ b/smartcontract/service/native/cross_chain/lock_proxy/states_test.go @@ -23,9 +23,9 @@ import ( "math/big" "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/cross_chain/lock_proxy/utils.go b/smartcontract/service/native/cross_chain/lock_proxy/utils.go index fffe51d727..7bc104fb78 100644 --- a/smartcontract/service/native/cross_chain/lock_proxy/utils.go +++ b/smartcontract/service/native/cross_chain/lock_proxy/utils.go @@ -23,13 +23,13 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/cross_chain_manager" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/cross_chain_manager" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/global_params/global_params.go b/smartcontract/service/native/global_params/global_params.go index 9610bd8d51..772f910a29 100644 --- a/smartcontract/service/native/global_params/global_params.go +++ b/smartcontract/service/native/global_params/global_params.go @@ -21,10 +21,10 @@ package global_params import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type paramType byte diff --git a/smartcontract/service/native/global_params/param_test.go b/smartcontract/service/native/global_params/param_test.go index 5f97d43c15..a514e8cefa 100644 --- a/smartcontract/service/native/global_params/param_test.go +++ b/smartcontract/service/native/global_params/param_test.go @@ -22,7 +22,7 @@ import ( "strconv" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/global_params/states.go b/smartcontract/service/native/global_params/states.go index 8f778c9b79..605e34cc8e 100644 --- a/smartcontract/service/native/global_params/states.go +++ b/smartcontract/service/native/global_params/states.go @@ -21,9 +21,9 @@ package global_params import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type Param struct { diff --git a/smartcontract/service/native/global_params/utils.go b/smartcontract/service/native/global_params/utils.go index e67f40ea9c..a602c421ef 100644 --- a/smartcontract/service/native/global_params/utils.go +++ b/smartcontract/service/native/global_params/utils.go @@ -19,12 +19,12 @@ package global_params import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/governance/governance.go b/smartcontract/service/native/governance/governance.go index 0397840336..1d1af32a31 100644 --- a/smartcontract/service/native/governance/governance.go +++ b/smartcontract/service/native/governance/governance.go @@ -28,14 +28,14 @@ import ( "sort" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/governance/method.go b/smartcontract/service/native/governance/method.go index 55c02ea288..9a9d94980b 100644 --- a/smartcontract/service/native/governance/method.go +++ b/smartcontract/service/native/governance/method.go @@ -24,12 +24,12 @@ import ( "math/big" "sort" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func registerCandidate(native *native.NativeService, flag string) error { diff --git a/smartcontract/service/native/governance/param.go b/smartcontract/service/native/governance/param.go index ec05dee8dd..c85bfe692d 100644 --- a/smartcontract/service/native/governance/param.go +++ b/smartcontract/service/native/governance/param.go @@ -22,8 +22,8 @@ import ( "fmt" "math" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type RegisterCandidateParam struct { diff --git a/smartcontract/service/native/governance/states.go b/smartcontract/service/native/governance/states.go index 06c708cf04..530112af26 100644 --- a/smartcontract/service/native/governance/states.go +++ b/smartcontract/service/native/governance/states.go @@ -23,9 +23,9 @@ import ( "io" "sort" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/serialization" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/serialization" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type Status uint8 diff --git a/smartcontract/service/native/governance/utils.go b/smartcontract/service/native/governance/utils.go index 2c979aefb2..ea8a423e7c 100644 --- a/smartcontract/service/native/governance/utils.go +++ b/smartcontract/service/native/governance/utils.go @@ -24,15 +24,15 @@ import ( "fmt" "github.com/ontio/ontology-crypto/vrf" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/serialization" - vbftconfig "github.com/ontio/ontology/consensus/vbft/config" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/auth" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/serialization" + vbftconfig "github.com/ontio/ontology/v2/consensus/vbft/config" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/auth" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func GetPeerPoolMap(native *native.NativeService, contract common.Address, view uint32) (*PeerPoolMap, error) { diff --git a/smartcontract/service/native/init/init.go b/smartcontract/service/native/init/init.go index 8df1744a1e..c1da8cb014 100644 --- a/smartcontract/service/native/init/init.go +++ b/smartcontract/service/native/init/init.go @@ -22,20 +22,20 @@ import ( "bytes" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/auth" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/cross_chain_manager" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" - "github.com/ontio/ontology/smartcontract/service/native/cross_chain/lock_proxy" - params "github.com/ontio/ontology/smartcontract/service/native/global_params" - "github.com/ontio/ontology/smartcontract/service/native/governance" - "github.com/ontio/ontology/smartcontract/service/native/ong" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/ontfs" - "github.com/ontio/ontology/smartcontract/service/native/ontid" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/service/neovm" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/auth" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/cross_chain_manager" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/header_sync" + "github.com/ontio/ontology/v2/smartcontract/service/native/cross_chain/lock_proxy" + params "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + "github.com/ontio/ontology/v2/smartcontract/service/native/governance" + "github.com/ontio/ontology/v2/smartcontract/service/native/ong" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontid" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" + vm "github.com/ontio/ontology/v2/vm/neovm" ) var ( diff --git a/smartcontract/service/native/native_service.go b/smartcontract/service/native/native_service.go index 9b10226c3d..4845986bcc 100644 --- a/smartcontract/service/native/native_service.go +++ b/smartcontract/service/native/native_service.go @@ -21,16 +21,16 @@ package native import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/store" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/merkle" - "github.com/ontio/ontology/smartcontract/context" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/states" - sstates "github.com/ontio/ontology/smartcontract/states" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/store" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/merkle" + "github.com/ontio/ontology/v2/smartcontract/context" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/states" + sstates "github.com/ontio/ontology/v2/smartcontract/states" + "github.com/ontio/ontology/v2/smartcontract/storage" ) type ( diff --git a/smartcontract/service/native/ong/ong.go b/smartcontract/service/native/ong/ong.go index 4daef89468..55d66b9c1f 100644 --- a/smartcontract/service/native/ong/ong.go +++ b/smartcontract/service/native/ong/ong.go @@ -22,12 +22,12 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func InitOng() { diff --git a/smartcontract/service/native/ont/ont.go b/smartcontract/service/native/ont/ont.go index 09d93cece5..1886bac765 100644 --- a/smartcontract/service/native/ont/ont.go +++ b/smartcontract/service/native/ont/ont.go @@ -23,15 +23,15 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/common/serialization" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/common/serialization" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ont/states.go b/smartcontract/service/native/ont/states.go index 23fea54b88..5fbb0cbd4c 100644 --- a/smartcontract/service/native/ont/states.go +++ b/smartcontract/service/native/ont/states.go @@ -19,8 +19,8 @@ package ont import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) // Transfers diff --git a/smartcontract/service/native/ont/states_test.go b/smartcontract/service/native/ont/states_test.go index 2dede3317f..546180b6ee 100644 --- a/smartcontract/service/native/ont/states_test.go +++ b/smartcontract/service/native/ont/states_test.go @@ -21,7 +21,7 @@ package ont import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/ont/utils.go b/smartcontract/service/native/ont/utils.go index bd299fba00..251e919931 100644 --- a/smartcontract/service/native/ont/utils.go +++ b/smartcontract/service/native/ont/utils.go @@ -21,14 +21,14 @@ package ont import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ontfs/app_sdk.go b/smartcontract/service/native/ontfs/app_sdk.go index cd2398da99..e3305c925c 100644 --- a/smartcontract/service/native/ontfs/app_sdk.go +++ b/smartcontract/service/native/ontfs/app_sdk.go @@ -22,11 +22,11 @@ import ( "fmt" "math" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func FsGetNodeInfoList(native *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontfs/errors.go b/smartcontract/service/native/ontfs/errors.go index ce47d1c848..181f2d6e05 100644 --- a/smartcontract/service/native/ontfs/errors.go +++ b/smartcontract/service/native/ontfs/errors.go @@ -22,11 +22,11 @@ import ( "encoding/base64" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type Errors struct { diff --git a/smartcontract/service/native/ontfs/file_challenge.go b/smartcontract/service/native/ontfs/file_challenge.go index f60a681451..2560cd72d9 100644 --- a/smartcontract/service/native/ontfs/file_challenge.go +++ b/smartcontract/service/native/ontfs/file_challenge.go @@ -21,9 +21,9 @@ package ontfs import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type Challenge struct { diff --git a/smartcontract/service/native/ontfs/file_del.go b/smartcontract/service/native/ontfs/file_del.go index b8f2508f61..9456c5733e 100644 --- a/smartcontract/service/native/ontfs/file_del.go +++ b/smartcontract/service/native/ontfs/file_del.go @@ -19,8 +19,8 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type FileDel struct { diff --git a/smartcontract/service/native/ontfs/file_get_pledge.go b/smartcontract/service/native/ontfs/file_get_pledge.go index 841971b5ed..acc701f6d6 100644 --- a/smartcontract/service/native/ontfs/file_get_pledge.go +++ b/smartcontract/service/native/ontfs/file_get_pledge.go @@ -19,8 +19,8 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type GetReadPledge struct { diff --git a/smartcontract/service/native/ontfs/file_info.go b/smartcontract/service/native/ontfs/file_info.go index ca36f0951e..4d77dc5ef1 100644 --- a/smartcontract/service/native/ontfs/file_info.go +++ b/smartcontract/service/native/ontfs/file_info.go @@ -19,9 +19,9 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ontfs/file_pdp_data.go b/smartcontract/service/native/ontfs/file_pdp_data.go index 26987919a0..aabbf9f196 100644 --- a/smartcontract/service/native/ontfs/file_pdp_data.go +++ b/smartcontract/service/native/ontfs/file_pdp_data.go @@ -21,9 +21,9 @@ package ontfs import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type PdpData struct { diff --git a/smartcontract/service/native/ontfs/file_pdp_record.go b/smartcontract/service/native/ontfs/file_pdp_record.go index fec7667a16..79f36b3846 100644 --- a/smartcontract/service/native/ontfs/file_pdp_record.go +++ b/smartcontract/service/native/ontfs/file_pdp_record.go @@ -19,10 +19,10 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type PdpRecordKey struct { diff --git a/smartcontract/service/native/ontfs/file_read_pledge.go b/smartcontract/service/native/ontfs/file_read_pledge.go index 952e7740c5..9426376d91 100644 --- a/smartcontract/service/native/ontfs/file_read_pledge.go +++ b/smartcontract/service/native/ontfs/file_read_pledge.go @@ -19,10 +19,10 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type ReadPlan struct { diff --git a/smartcontract/service/native/ontfs/file_read_settle_slice.go b/smartcontract/service/native/ontfs/file_read_settle_slice.go index 0cc17115e4..aee9fdd537 100644 --- a/smartcontract/service/native/ontfs/file_read_settle_slice.go +++ b/smartcontract/service/native/ontfs/file_read_settle_slice.go @@ -19,8 +19,8 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type FileReadSettleSlice struct { diff --git a/smartcontract/service/native/ontfs/file_renew.go b/smartcontract/service/native/ontfs/file_renew.go index ea57f9d62b..f37ed04e63 100644 --- a/smartcontract/service/native/ontfs/file_renew.go +++ b/smartcontract/service/native/ontfs/file_renew.go @@ -19,8 +19,8 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type FileReNew struct { diff --git a/smartcontract/service/native/ontfs/file_transfer.go b/smartcontract/service/native/ontfs/file_transfer.go index cff06cf673..c32010e6a0 100644 --- a/smartcontract/service/native/ontfs/file_transfer.go +++ b/smartcontract/service/native/ontfs/file_transfer.go @@ -21,9 +21,9 @@ package ontfs import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type FileTransfer struct { diff --git a/smartcontract/service/native/ontfs/global_param.go b/smartcontract/service/native/ontfs/global_param.go index aed45cb2c3..1012a6f9c3 100644 --- a/smartcontract/service/native/ontfs/global_param.go +++ b/smartcontract/service/native/ontfs/global_param.go @@ -19,10 +19,10 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type FsGlobalParam struct { diff --git a/smartcontract/service/native/ontfs/init.go b/smartcontract/service/native/ontfs/init.go index a545ea0874..21f53e989f 100644 --- a/smartcontract/service/native/ontfs/init.go +++ b/smartcontract/service/native/ontfs/init.go @@ -19,10 +19,10 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func InitFs() { diff --git a/smartcontract/service/native/ontfs/node_business.go b/smartcontract/service/native/ontfs/node_business.go index 632c06b713..2e90186bcd 100644 --- a/smartcontract/service/native/ontfs/node_business.go +++ b/smartcontract/service/native/ontfs/node_business.go @@ -23,13 +23,13 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func FsFileProve(native *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontfs/node_govern.go b/smartcontract/service/native/ontfs/node_govern.go index 50114a49d2..faeb7f8389 100644 --- a/smartcontract/service/native/ontfs/node_govern.go +++ b/smartcontract/service/native/ontfs/node_govern.go @@ -19,11 +19,11 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func FsNodeRegister(native *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontfs/node_info.go b/smartcontract/service/native/ontfs/node_info.go index 4dc3e0d64b..6148278b61 100644 --- a/smartcontract/service/native/ontfs/node_info.go +++ b/smartcontract/service/native/ontfs/node_info.go @@ -19,10 +19,10 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type FsNodeInfo struct { diff --git a/smartcontract/service/native/ontfs/node_info_test.go b/smartcontract/service/native/ontfs/node_info_test.go index 6b7a9c0951..3e9ace83aa 100644 --- a/smartcontract/service/native/ontfs/node_info_test.go +++ b/smartcontract/service/native/ontfs/node_info_test.go @@ -22,7 +22,7 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/ontfs/node_list_sort.go b/smartcontract/service/native/ontfs/node_list_sort.go index d469a1be32..505d9d1e04 100644 --- a/smartcontract/service/native/ontfs/node_list_sort.go +++ b/smartcontract/service/native/ontfs/node_list_sort.go @@ -21,7 +21,7 @@ package ontfs import ( "encoding/binary" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "golang.org/x/crypto/sha3" ) diff --git a/smartcontract/service/native/ontfs/passport.go b/smartcontract/service/native/ontfs/passport.go index 6589eff163..6c2b1dbeff 100644 --- a/smartcontract/service/native/ontfs/passport.go +++ b/smartcontract/service/native/ontfs/passport.go @@ -23,9 +23,9 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type Passport struct { diff --git a/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp.go b/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp.go index 1c1af9480d..2b10842ec6 100644 --- a/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp.go +++ b/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp.go @@ -25,7 +25,7 @@ import ( "golang.org/x/crypto/sha3" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp/types" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp/types" ) const ( diff --git a/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp_test.go b/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp_test.go index d35f3fb02d..95e67e2f79 100644 --- a/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp_test.go +++ b/smartcontract/service/native/ontfs/pdp/merkle_pdp/merkle_pdp_test.go @@ -22,7 +22,7 @@ import ( "crypto/rand" "testing" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp/types" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp/types" ) func TestMerkleProof(t *testing.T) { diff --git a/smartcontract/service/native/ontfs/pdp/pdp.go b/smartcontract/service/native/ontfs/pdp/pdp.go index 4a90f23025..6ced8f24c2 100644 --- a/smartcontract/service/native/ontfs/pdp/pdp.go +++ b/smartcontract/service/native/ontfs/pdp/pdp.go @@ -25,8 +25,8 @@ import ( "fmt" "math/big" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp/merkle_pdp" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp/types" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp/merkle_pdp" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp/types" ) const ( diff --git a/smartcontract/service/native/ontfs/pdp/pdp_test.go b/smartcontract/service/native/ontfs/pdp/pdp_test.go index 4dc107571f..cb796b7504 100644 --- a/smartcontract/service/native/ontfs/pdp/pdp_test.go +++ b/smartcontract/service/native/ontfs/pdp/pdp_test.go @@ -22,7 +22,7 @@ import ( "crypto/rand" "testing" - "github.com/ontio/ontology/smartcontract/service/native/ontfs/pdp/types" + "github.com/ontio/ontology/v2/smartcontract/service/native/ontfs/pdp/types" ) func TestPdpVerify(t *testing.T) { diff --git a/smartcontract/service/native/ontfs/result_info.go b/smartcontract/service/native/ontfs/result_info.go index 31f64affda..963685aa52 100644 --- a/smartcontract/service/native/ontfs/result_info.go +++ b/smartcontract/service/native/ontfs/result_info.go @@ -21,7 +21,7 @@ package ontfs import ( "fmt" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type RetInfo struct { diff --git a/smartcontract/service/native/ontfs/space_info.go b/smartcontract/service/native/ontfs/space_info.go index 25e9bf9e5c..032d69729a 100644 --- a/smartcontract/service/native/ontfs/space_info.go +++ b/smartcontract/service/native/ontfs/space_info.go @@ -19,9 +19,9 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type SpaceInfo struct { diff --git a/smartcontract/service/native/ontfs/space_update.go b/smartcontract/service/native/ontfs/space_update.go index cc49153845..bf5904e876 100644 --- a/smartcontract/service/native/ontfs/space_update.go +++ b/smartcontract/service/native/ontfs/space_update.go @@ -19,8 +19,8 @@ package ontfs import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type SpaceUpdate struct { diff --git a/smartcontract/service/native/ontfs/utils.go b/smartcontract/service/native/ontfs/utils.go index a29a8022f2..b7d6d0455f 100644 --- a/smartcontract/service/native/ontfs/utils.go +++ b/smartcontract/service/native/ontfs/utils.go @@ -21,12 +21,12 @@ package ontfs import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ontid/attribute.go b/smartcontract/service/native/ontid/attribute.go index d81f773227..55c842f583 100644 --- a/smartcontract/service/native/ontid/attribute.go +++ b/smartcontract/service/native/ontid/attribute.go @@ -22,9 +22,9 @@ import ( "fmt" "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ontid/attribute_test.go b/smartcontract/service/native/ontid/attribute_test.go index 381963e6ff..14a275275d 100644 --- a/smartcontract/service/native/ontid/attribute_test.go +++ b/smartcontract/service/native/ontid/attribute_test.go @@ -23,10 +23,10 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func TestAttribute(t *testing.T) { diff --git a/smartcontract/service/native/ontid/authentication.go b/smartcontract/service/native/ontid/authentication.go index d4a354a181..117c95ed34 100644 --- a/smartcontract/service/native/ontid/authentication.go +++ b/smartcontract/service/native/ontid/authentication.go @@ -22,9 +22,9 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func addNewAuthKey(srvc *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontid/authentication_test.go b/smartcontract/service/native/ontid/authentication_test.go index 64ca931d0d..cfad29ba72 100644 --- a/smartcontract/service/native/ontid/authentication_test.go +++ b/smartcontract/service/native/ontid/authentication_test.go @@ -21,9 +21,9 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func TestAuthentication(t *testing.T) { diff --git a/smartcontract/service/native/ontid/context.go b/smartcontract/service/native/ontid/context.go index 9fb94f8c32..1c19333370 100644 --- a/smartcontract/service/native/ontid/context.go +++ b/smartcontract/service/native/ontid/context.go @@ -22,10 +22,10 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) // diff --git a/smartcontract/service/native/ontid/context_test.go b/smartcontract/service/native/ontid/context_test.go index ebf8d8cb6e..5744eb45c2 100644 --- a/smartcontract/service/native/ontid/context_test.go +++ b/smartcontract/service/native/ontid/context_test.go @@ -21,9 +21,9 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func TestContext(t *testing.T) { diff --git a/smartcontract/service/native/ontid/controller.go b/smartcontract/service/native/ontid/controller.go index f839fc55bd..0a53d2374c 100644 --- a/smartcontract/service/native/ontid/controller.go +++ b/smartcontract/service/native/ontid/controller.go @@ -22,10 +22,10 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func regIdWithController(srvc *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontid/controller_test.go b/smartcontract/service/native/ontid/controller_test.go index 0fbfde36cc..36e0a57c44 100644 --- a/smartcontract/service/native/ontid/controller_test.go +++ b/smartcontract/service/native/ontid/controller_test.go @@ -22,10 +22,10 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func TestCaseController(t *testing.T) { diff --git a/smartcontract/service/native/ontid/event.go b/smartcontract/service/native/ontid/event.go index 2fd2cd2ebc..7ccac58144 100644 --- a/smartcontract/service/native/ontid/event.go +++ b/smartcontract/service/native/ontid/event.go @@ -20,9 +20,9 @@ package ontid import ( "encoding/hex" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func newEvent(srvc *native.NativeService, st interface{}) { diff --git a/smartcontract/service/native/ontid/group.go b/smartcontract/service/native/ontid/group.go index 63a65b540d..4ea5fe792a 100644 --- a/smartcontract/service/native/ontid/group.go +++ b/smartcontract/service/native/ontid/group.go @@ -22,9 +22,9 @@ import ( "encoding/json" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const MAX_DEPTH = 8 diff --git a/smartcontract/service/native/ontid/group_test.go b/smartcontract/service/native/ontid/group_test.go index 0624f00a13..fecefbf0c1 100644 --- a/smartcontract/service/native/ontid/group_test.go +++ b/smartcontract/service/native/ontid/group_test.go @@ -23,14 +23,14 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/store/overlaydb" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/overlaydb" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/storage" ) func (g *Group) Serialize() []byte { diff --git a/smartcontract/service/native/ontid/init.go b/smartcontract/service/native/ontid/init.go index 135398dd6c..482afad0f7 100644 --- a/smartcontract/service/native/ontid/init.go +++ b/smartcontract/service/native/ontid/init.go @@ -18,9 +18,9 @@ package ontid import ( - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func Init() { diff --git a/smartcontract/service/native/ontid/method.go b/smartcontract/service/native/ontid/method.go index 79379e5add..a6dbafbac9 100644 --- a/smartcontract/service/native/ontid/method.go +++ b/smartcontract/service/native/ontid/method.go @@ -24,12 +24,12 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func regIdWithPublicKey(srvc *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontid/ontid_test.go b/smartcontract/service/native/ontid/ontid_test.go index 5e0daedfa8..3212c5bbbf 100644 --- a/smartcontract/service/native/ontid/ontid_test.go +++ b/smartcontract/service/native/ontid/ontid_test.go @@ -24,12 +24,12 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/testsuite" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/testsuite" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/ontid/owner.go b/smartcontract/service/native/ontid/owner.go index d04847a5eb..aa0a07c8f4 100644 --- a/smartcontract/service/native/ontid/owner.go +++ b/smartcontract/service/native/ontid/owner.go @@ -24,12 +24,12 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ontid/param.go b/smartcontract/service/native/ontid/param.go index 5f5842147c..b860c5b96c 100644 --- a/smartcontract/service/native/ontid/param.go +++ b/smartcontract/service/native/ontid/param.go @@ -20,9 +20,9 @@ package ontid import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type SetKeyAccessParam struct { diff --git a/smartcontract/service/native/ontid/proof.go b/smartcontract/service/native/ontid/proof.go index 39ba3a9799..33e6c1d40e 100644 --- a/smartcontract/service/native/ontid/proof.go +++ b/smartcontract/service/native/ontid/proof.go @@ -20,9 +20,9 @@ package ontid import ( "errors" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func addProof(srvc *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontid/query.go b/smartcontract/service/native/ontid/query.go index 35d2ad069d..8a15b8f809 100644 --- a/smartcontract/service/native/ontid/query.go +++ b/smartcontract/service/native/ontid/query.go @@ -24,10 +24,10 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func GetPublicKeyByID(srvc *native.NativeService) ([]byte, error) { diff --git a/smartcontract/service/native/ontid/query_test.go b/smartcontract/service/native/ontid/query_test.go index 86fdf53198..17c1ed9cd0 100644 --- a/smartcontract/service/native/ontid/query_test.go +++ b/smartcontract/service/native/ontid/query_test.go @@ -20,7 +20,7 @@ package ontid import ( "testing" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func TestQueryDocument(t *testing.T) { diff --git a/smartcontract/service/native/ontid/recovery.go b/smartcontract/service/native/ontid/recovery.go index 31dce2188a..bd01ce7c5d 100644 --- a/smartcontract/service/native/ontid/recovery.go +++ b/smartcontract/service/native/ontid/recovery.go @@ -23,10 +23,10 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) const ( diff --git a/smartcontract/service/native/ontid/recovery_test.go b/smartcontract/service/native/ontid/recovery_test.go index c7e717d167..61a31d6b9d 100644 --- a/smartcontract/service/native/ontid/recovery_test.go +++ b/smartcontract/service/native/ontid/recovery_test.go @@ -22,10 +22,10 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func TestRecovery(t *testing.T) { diff --git a/smartcontract/service/native/ontid/service.go b/smartcontract/service/native/ontid/service.go index 63cc4e307f..67cacda60c 100644 --- a/smartcontract/service/native/ontid/service.go +++ b/smartcontract/service/native/ontid/service.go @@ -22,11 +22,11 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) type serviceJson struct { diff --git a/smartcontract/service/native/ontid/service_test.go b/smartcontract/service/native/ontid/service_test.go index 019e243046..1b678b47f4 100644 --- a/smartcontract/service/native/ontid/service_test.go +++ b/smartcontract/service/native/ontid/service_test.go @@ -21,9 +21,9 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func TestService(t *testing.T) { diff --git a/smartcontract/service/native/ontid/time.go b/smartcontract/service/native/ontid/time.go index d78f61e5af..28ba0bc306 100644 --- a/smartcontract/service/native/ontid/time.go +++ b/smartcontract/service/native/ontid/time.go @@ -20,11 +20,11 @@ package ontid import ( "errors" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func updateTime(srvc *native.NativeService, key []byte) { diff --git a/smartcontract/service/native/ontid/utils.go b/smartcontract/service/native/ontid/utils.go index 5e582fce68..722e841247 100644 --- a/smartcontract/service/native/ontid/utils.go +++ b/smartcontract/service/native/ontid/utils.go @@ -22,12 +22,12 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" ) func isValid(srvc *native.NativeService, encId []byte) bool { diff --git a/smartcontract/service/native/testsuite/fakedb.go b/smartcontract/service/native/testsuite/fakedb.go index 4e38a9b9c3..831e154ffa 100644 --- a/smartcontract/service/native/testsuite/fakedb.go +++ b/smartcontract/service/native/testsuite/fakedb.go @@ -18,8 +18,8 @@ package testsuite import ( - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/overlaydb" ) func NewOverlayDB() *overlaydb.OverlayDB { diff --git a/smartcontract/service/native/testsuite/ont_suite.go b/smartcontract/service/native/testsuite/ont_suite.go index 1541d5c81b..24888cbddb 100644 --- a/smartcontract/service/native/testsuite/ont_suite.go +++ b/smartcontract/service/native/testsuite/ont_suite.go @@ -23,13 +23,13 @@ import ( "testing" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - utils2 "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + utils2 "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/storage" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/testsuite/ont_suite_test.go b/smartcontract/service/native/testsuite/ont_suite_test.go index 71b4bdefa3..4c4c0f857c 100644 --- a/smartcontract/service/native/testsuite/ont_suite_test.go +++ b/smartcontract/service/native/testsuite/ont_suite_test.go @@ -18,15 +18,15 @@ package testsuite import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/smartcontract/service/native" - _ "github.com/ontio/ontology/smartcontract/service/native/init" - "github.com/ontio/ontology/smartcontract/service/native/ong" - "github.com/ontio/ontology/smartcontract/service/native/ont" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/smartcontract/service/native" + _ "github.com/ontio/ontology/v2/smartcontract/service/native/init" + "github.com/ontio/ontology/v2/smartcontract/service/native/ong" + "github.com/ontio/ontology/v2/smartcontract/service/native/ont" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/storage" "github.com/stretchr/testify/assert" "testing" diff --git a/smartcontract/service/native/utils/linked_list.go b/smartcontract/service/native/utils/linked_list.go index 855a4ff847..e392337371 100644 --- a/smartcontract/service/native/utils/linked_list.go +++ b/smartcontract/service/native/utils/linked_list.go @@ -20,10 +20,10 @@ package utils import ( "fmt" - "github.com/ontio/ontology/common" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/common" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) type LinkedlistNode struct { diff --git a/smartcontract/service/native/utils/operation.go b/smartcontract/service/native/utils/operation.go index 29418b0f10..8f393a8a6c 100644 --- a/smartcontract/service/native/utils/operation.go +++ b/smartcontract/service/native/utils/operation.go @@ -22,10 +22,10 @@ import ( "bytes" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/serialization" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/serialization" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func ConcatKey(contract common.Address, args ...[]byte) []byte { diff --git a/smartcontract/service/native/utils/params.go b/smartcontract/service/native/utils/params.go index da61f2f18b..b2783cfcd0 100644 --- a/smartcontract/service/native/utils/params.go +++ b/smartcontract/service/native/utils/params.go @@ -18,7 +18,7 @@ package utils import ( - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) var ( diff --git a/smartcontract/service/native/utils/params_test.go b/smartcontract/service/native/utils/params_test.go index 2b8fbbd7d1..26e1727d88 100644 --- a/smartcontract/service/native/utils/params_test.go +++ b/smartcontract/service/native/utils/params_test.go @@ -21,7 +21,7 @@ package utils import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/native/utils/serialization.go b/smartcontract/service/native/utils/serialization.go index 8b5d123a2b..a3a48a7914 100644 --- a/smartcontract/service/native/utils/serialization.go +++ b/smartcontract/service/native/utils/serialization.go @@ -23,7 +23,7 @@ import ( "io" "math/big" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) func EncodeAddress(sink *common.ZeroCopySink, addr common.Address) (size uint64) { diff --git a/smartcontract/service/native/utils/store.go b/smartcontract/service/native/utils/store.go index d29311860c..f17466bf2e 100644 --- a/smartcontract/service/native/utils/store.go +++ b/smartcontract/service/native/utils/store.go @@ -21,11 +21,11 @@ package utils import ( "bytes" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/serialization" - cstates "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/service/native" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/serialization" + cstates "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/service/native" ) func GetStorageItem(native *native.NativeService, key []byte) (*cstates.StorageItem, error) { diff --git a/smartcontract/service/native/utils/unbind_ong.go b/smartcontract/service/native/utils/unbind_ong.go index 0e4ae1a7fd..e112dd1b04 100644 --- a/smartcontract/service/native/utils/unbind_ong.go +++ b/smartcontract/service/native/utils/unbind_ong.go @@ -19,8 +19,8 @@ package utils import ( - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" ) var ( diff --git a/smartcontract/service/native/utils/unbind_ong_test.go b/smartcontract/service/native/utils/unbind_ong_test.go index bb41fee54d..c77a943c14 100644 --- a/smartcontract/service/native/utils/unbind_ong_test.go +++ b/smartcontract/service/native/utils/unbind_ong_test.go @@ -22,8 +22,8 @@ import ( "math/rand" "testing" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/service/neovm/attribute.go b/smartcontract/service/neovm/attribute.go index 658479080f..0d1be11f79 100644 --- a/smartcontract/service/neovm/attribute.go +++ b/smartcontract/service/neovm/attribute.go @@ -19,10 +19,10 @@ package neovm import ( - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" - vmtypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" + vmtypes "github.com/ontio/ontology/v2/vm/neovm/types" ) // AttributeGetUsage put attribute's usage to vm stack diff --git a/smartcontract/service/neovm/block.go b/smartcontract/service/neovm/block.go index 5660ff6c02..75c330322e 100644 --- a/smartcontract/service/neovm/block.go +++ b/smartcontract/service/neovm/block.go @@ -18,10 +18,10 @@ package neovm import ( - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" - vmtypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" + vmtypes "github.com/ontio/ontology/v2/vm/neovm/types" ) // BlockGetTransactionCount put block's transactions count to vm stack diff --git a/smartcontract/service/neovm/blockchain.go b/smartcontract/service/neovm/blockchain.go index 0e907c5539..34824c7ad8 100644 --- a/smartcontract/service/neovm/blockchain.go +++ b/smartcontract/service/neovm/blockchain.go @@ -21,9 +21,9 @@ package neovm import ( "math/big" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) // BlockChainGetHeight put blockchain's height to vm stack diff --git a/smartcontract/service/neovm/config.go b/smartcontract/service/neovm/config.go index 8b138ea818..8382931cf7 100644 --- a/smartcontract/service/neovm/config.go +++ b/smartcontract/service/neovm/config.go @@ -21,7 +21,7 @@ package neovm import ( "sync" - "github.com/ontio/ontology/common/config" + "github.com/ontio/ontology/v2/common/config" ) var ( diff --git a/smartcontract/service/neovm/contract.go b/smartcontract/service/neovm/contract.go index 0d8a4af0a3..2c1dce0c4e 100644 --- a/smartcontract/service/neovm/contract.go +++ b/smartcontract/service/neovm/contract.go @@ -21,10 +21,10 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) // ContractCreate create a new smart contract on blockchain, and put it to vm stack diff --git a/smartcontract/service/neovm/deprecated.go b/smartcontract/service/neovm/deprecated.go index 1f934c26da..636bc78dd1 100644 --- a/smartcontract/service/neovm/deprecated.go +++ b/smartcontract/service/neovm/deprecated.go @@ -19,10 +19,10 @@ package neovm import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) // BlockChainGetHeader put blockchain's header to vm stack diff --git a/smartcontract/service/neovm/gas_cost.go b/smartcontract/service/neovm/gas_cost.go index b8d3cac731..df9a52dc64 100644 --- a/smartcontract/service/neovm/gas_cost.go +++ b/smartcontract/service/neovm/gas_cost.go @@ -19,8 +19,8 @@ package neovm import ( - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) func StoreGasCost(gasTable map[string]uint64, engine *vm.Executor) (uint64, error) { diff --git a/smartcontract/service/neovm/header.go b/smartcontract/service/neovm/header.go index a094999d02..7f3b7e5cfc 100644 --- a/smartcontract/service/neovm/header.go +++ b/smartcontract/service/neovm/header.go @@ -21,10 +21,10 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) type HeaderValue struct { diff --git a/smartcontract/service/neovm/native.go b/smartcontract/service/neovm/native.go index 02b72dcbc2..508c9742a7 100644 --- a/smartcontract/service/neovm/native.go +++ b/smartcontract/service/neovm/native.go @@ -21,10 +21,10 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/states" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/states" + vm "github.com/ontio/ontology/v2/vm/neovm" ) func NativeInvoke(service *NeoVmService, engine *vm.Executor) error { diff --git a/smartcontract/service/neovm/neovm_service.go b/smartcontract/service/neovm/neovm_service.go index 8e131a5d2c..137686d430 100644 --- a/smartcontract/service/neovm/neovm_service.go +++ b/smartcontract/service/neovm/neovm_service.go @@ -23,17 +23,17 @@ import ( "fmt" "io" - scommon "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/store" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/context" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/storage" - vm "github.com/ontio/ontology/vm/neovm" - vmty "github.com/ontio/ontology/vm/neovm/types" + scommon "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/store" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/context" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/storage" + vm "github.com/ontio/ontology/v2/vm/neovm" + vmty "github.com/ontio/ontology/v2/vm/neovm/types" ) var ( diff --git a/smartcontract/service/neovm/runtime.go b/smartcontract/service/neovm/runtime.go index f340d06815..8880856eac 100644 --- a/smartcontract/service/neovm/runtime.go +++ b/smartcontract/service/neovm/runtime.go @@ -22,14 +22,14 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/event" - vm "github.com/ontio/ontology/vm/neovm" - vmtypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/event" + vm "github.com/ontio/ontology/v2/vm/neovm" + vmtypes "github.com/ontio/ontology/v2/vm/neovm/types" ) // HeaderGetNextConsensus put current block time to vm stack diff --git a/smartcontract/service/neovm/storage.go b/smartcontract/service/neovm/storage.go index aa18c12dec..68bf75f453 100644 --- a/smartcontract/service/neovm/storage.go +++ b/smartcontract/service/neovm/storage.go @@ -21,10 +21,10 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) // StoragePut put smart contract storage item to cache diff --git a/smartcontract/service/neovm/storage_context.go b/smartcontract/service/neovm/storage_context.go index 8d2a076279..5265414cf3 100644 --- a/smartcontract/service/neovm/storage_context.go +++ b/smartcontract/service/neovm/storage_context.go @@ -21,8 +21,8 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/common" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + vm "github.com/ontio/ontology/v2/vm/neovm" ) // StorageContext store smart contract address diff --git a/smartcontract/service/neovm/system.go b/smartcontract/service/neovm/system.go index 3639ba750f..63f542ec21 100644 --- a/smartcontract/service/neovm/system.go +++ b/smartcontract/service/neovm/system.go @@ -19,8 +19,8 @@ package neovm import ( - "github.com/ontio/ontology/errors" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/errors" + vm "github.com/ontio/ontology/v2/vm/neovm" ) // GetCodeContainer push current transaction to vm stack diff --git a/smartcontract/service/neovm/transaction.go b/smartcontract/service/neovm/transaction.go index 5feac0eb00..9a4416c2d5 100644 --- a/smartcontract/service/neovm/transaction.go +++ b/smartcontract/service/neovm/transaction.go @@ -21,9 +21,9 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/core/types" - vm "github.com/ontio/ontology/vm/neovm" - vmtypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/core/types" + vm "github.com/ontio/ontology/v2/vm/neovm" + vmtypes "github.com/ontio/ontology/v2/vm/neovm/types" ) // GetExecutingAddress push transaction's hash to vm stack diff --git a/smartcontract/service/neovm/wasmvm.go b/smartcontract/service/neovm/wasmvm.go index e0dbe89f94..037be56a43 100644 --- a/smartcontract/service/neovm/wasmvm.go +++ b/smartcontract/service/neovm/wasmvm.go @@ -21,12 +21,12 @@ import ( "fmt" "reflect" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/vm/crossvm_codec" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/vm/crossvm_codec" + vm "github.com/ontio/ontology/v2/vm/neovm" ) //neovm contract call wasmvm contract diff --git a/smartcontract/service/util/util.go b/smartcontract/service/util/util.go index 30a9726681..7645fb6bfd 100644 --- a/smartcontract/service/util/util.go +++ b/smartcontract/service/util/util.go @@ -21,12 +21,12 @@ import ( "bytes" "errors" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/smartcontract/context" - neovms "github.com/ontio/ontology/smartcontract/service/neovm" - "github.com/ontio/ontology/vm/crossvm_codec" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/smartcontract/context" + neovms "github.com/ontio/ontology/v2/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/vm/crossvm_codec" + "github.com/ontio/ontology/v2/vm/neovm" ) func BuildNeoVMParamEvalStack(params []interface{}) (*neovm.ValueStack, error) { diff --git a/smartcontract/service/wasmvm/contract.go b/smartcontract/service/wasmvm/contract.go index b9aa6403fc..cc0cb7514d 100644 --- a/smartcontract/service/wasmvm/contract.go +++ b/smartcontract/service/wasmvm/contract.go @@ -19,10 +19,10 @@ package wasmvm import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/errors" "github.com/ontio/wagon/exec" ) diff --git a/smartcontract/service/wasmvm/runtime.go b/smartcontract/service/wasmvm/runtime.go index 8980b099f7..916e6f3780 100644 --- a/smartcontract/service/wasmvm/runtime.go +++ b/smartcontract/service/wasmvm/runtime.go @@ -24,18 +24,18 @@ import ( "io" "reflect" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/event" - native2 "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/service/util" - "github.com/ontio/ontology/smartcontract/states" - "github.com/ontio/ontology/vm/crossvm_codec" - neotypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/event" + native2 "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/service/util" + "github.com/ontio/ontology/v2/smartcontract/states" + "github.com/ontio/ontology/v2/vm/crossvm_codec" + neotypes "github.com/ontio/ontology/v2/vm/neovm/types" "github.com/ontio/wagon/exec" "github.com/ontio/wagon/wasm" ) diff --git a/smartcontract/service/wasmvm/storage.go b/smartcontract/service/wasmvm/storage.go index ef70e4813b..d03d7f6e2f 100644 --- a/smartcontract/service/wasmvm/storage.go +++ b/smartcontract/service/wasmvm/storage.go @@ -21,7 +21,7 @@ import ( "errors" "math" - "github.com/ontio/ontology/core/states" + "github.com/ontio/ontology/v2/core/states" "github.com/ontio/wagon/exec" ) diff --git a/smartcontract/service/wasmvm/utils.go b/smartcontract/service/wasmvm/utils.go index ebc261f70e..33020cc96c 100644 --- a/smartcontract/service/wasmvm/utils.go +++ b/smartcontract/service/wasmvm/utils.go @@ -22,7 +22,7 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common/config" + "github.com/ontio/ontology/v2/common/config" "github.com/ontio/wagon/exec" "github.com/ontio/wagon/validate" "github.com/ontio/wagon/wasm" diff --git a/smartcontract/service/wasmvm/wasm_service.go b/smartcontract/service/wasmvm/wasm_service.go index 6a2e35a5d6..b4dd643095 100644 --- a/smartcontract/service/wasmvm/wasm_service.go +++ b/smartcontract/service/wasmvm/wasm_service.go @@ -21,14 +21,14 @@ import ( "sync" lru "github.com/hashicorp/golang-lru" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/context" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/states" - "github.com/ontio/ontology/smartcontract/storage" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/context" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/states" + "github.com/ontio/ontology/v2/smartcontract/storage" "github.com/ontio/wagon/exec" ) diff --git a/smartcontract/service/wasmvm/wasmjit_runtime.go b/smartcontract/service/wasmvm/wasmjit_runtime.go index abb47dc50d..52755aef3d 100644 --- a/smartcontract/service/wasmvm/wasmjit_runtime.go +++ b/smartcontract/service/wasmvm/wasmjit_runtime.go @@ -32,11 +32,11 @@ import ( "math" "unsafe" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - states2 "github.com/ontio/ontology/core/states" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/smartcontract/states" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + states2 "github.com/ontio/ontology/v2/core/states" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/smartcontract/states" ) const ( diff --git a/smartcontract/smart_contract.go b/smartcontract/smart_contract.go index 0b20d5b874..24f018fa29 100644 --- a/smartcontract/smart_contract.go +++ b/smartcontract/smart_contract.go @@ -21,17 +21,17 @@ import ( "errors" "fmt" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/store" - ctypes "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract/context" - "github.com/ontio/ontology/smartcontract/event" - "github.com/ontio/ontology/smartcontract/service/native" - "github.com/ontio/ontology/smartcontract/service/neovm" - "github.com/ontio/ontology/smartcontract/service/wasmvm" - "github.com/ontio/ontology/smartcontract/storage" - vm "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/store" + ctypes "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract/context" + "github.com/ontio/ontology/v2/smartcontract/event" + "github.com/ontio/ontology/v2/smartcontract/service/native" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/smartcontract/service/wasmvm" + "github.com/ontio/ontology/v2/smartcontract/storage" + vm "github.com/ontio/ontology/v2/vm/neovm" ) const ( diff --git a/smartcontract/states/contract.go b/smartcontract/states/contract.go index bec34b03f4..6883d45593 100644 --- a/smartcontract/states/contract.go +++ b/smartcontract/states/contract.go @@ -21,8 +21,8 @@ package states import ( "io" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/smartcontract/event" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/smartcontract/event" ) // Invoke smart contract struct diff --git a/smartcontract/states/contract_test.go b/smartcontract/states/contract_test.go index d47f60dc28..a393eeffc9 100644 --- a/smartcontract/states/contract_test.go +++ b/smartcontract/states/contract_test.go @@ -20,7 +20,7 @@ package states import ( "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) func TestContract_Serialize_Deserialize(t *testing.T) { diff --git a/smartcontract/states/wasmContract.go b/smartcontract/states/wasmContract.go index 411746dc8a..24a817b1aa 100644 --- a/smartcontract/states/wasmContract.go +++ b/smartcontract/states/wasmContract.go @@ -21,7 +21,7 @@ package states import ( "io" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type WasmContractParam struct { diff --git a/smartcontract/storage/cachedb.go b/smartcontract/storage/cachedb.go index edcbcabc2c..01ac60ef06 100644 --- a/smartcontract/storage/cachedb.go +++ b/smartcontract/storage/cachedb.go @@ -19,10 +19,10 @@ package storage import ( - comm "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/overlaydb" + comm "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/overlaydb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/smartcontract/storage/cachedb_test.go b/smartcontract/storage/cachedb_test.go index 86ff7816ce..70a147be16 100644 --- a/smartcontract/storage/cachedb_test.go +++ b/smartcontract/storage/cachedb_test.go @@ -21,9 +21,9 @@ import ( "math/rand" "testing" - "github.com/ontio/ontology/core/store/common" - "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/store/overlaydb" + "github.com/ontio/ontology/v2/core/store/common" + "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/store/overlaydb" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/append_test.go b/smartcontract/test/append_test.go index c45f50855c..99e803ee28 100644 --- a/smartcontract/test/append_test.go +++ b/smartcontract/test/append_test.go @@ -21,10 +21,10 @@ package test import ( "testing" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/vm/neovm" - "github.com/ontio/ontology/vm/neovm/errors" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/vm/neovm" + "github.com/ontio/ontology/v2/vm/neovm/errors" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/common_test.go b/smartcontract/test/common_test.go index 822be627b4..14ee40be28 100644 --- a/smartcontract/test/common_test.go +++ b/smartcontract/test/common_test.go @@ -21,10 +21,10 @@ package test import ( "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/vm/neovm" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/equal_stack_overflow_test.go b/smartcontract/test/equal_stack_overflow_test.go index 39758733a8..92abac35c9 100644 --- a/smartcontract/test/equal_stack_overflow_test.go +++ b/smartcontract/test/equal_stack_overflow_test.go @@ -22,10 +22,10 @@ import ( "os" "testing" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - . "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + . "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/vm/neovm" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/infinite_loop_test.go b/smartcontract/test/infinite_loop_test.go index 001e37b9d2..f4c71fdbb7 100644 --- a/smartcontract/test/infinite_loop_test.go +++ b/smartcontract/test/infinite_loop_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/ontio/ontology/core/types" - . "github.com/ontio/ontology/smartcontract" + "github.com/ontio/ontology/v2/core/types" + . "github.com/ontio/ontology/v2/smartcontract" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/map_test.go b/smartcontract/test/map_test.go index 98538cc25d..8537811372 100644 --- a/smartcontract/test/map_test.go +++ b/smartcontract/test/map_test.go @@ -22,9 +22,9 @@ import ( "fmt" "testing" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/vm/neovm" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/native_test.go b/smartcontract/test/native_test.go index 354ffc0c95..2314317356 100644 --- a/smartcontract/test/native_test.go +++ b/smartcontract/test/native_test.go @@ -21,9 +21,9 @@ package test import ( "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/neovm_feature_check_test.go b/smartcontract/test/neovm_feature_check_test.go index 4e35ee49d7..c8c5dedf31 100644 --- a/smartcontract/test/neovm_feature_check_test.go +++ b/smartcontract/test/neovm_feature_check_test.go @@ -21,11 +21,11 @@ package test import ( "testing" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/vm/neovm" - "github.com/ontio/ontology/vm/neovm/errors" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/vm/neovm" + "github.com/ontio/ontology/v2/vm/neovm/errors" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/pack_test.go b/smartcontract/test/pack_test.go index ce7a00ab7d..35b96f577a 100644 --- a/smartcontract/test/pack_test.go +++ b/smartcontract/test/pack_test.go @@ -22,9 +22,9 @@ import ( "os" "testing" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + "github.com/ontio/ontology/v2/vm/neovm" ) func TestPackCrash(t *testing.T) { diff --git a/smartcontract/test/panic_test.go b/smartcontract/test/panic_test.go index 3fd9cab533..c6e250fd92 100644 --- a/smartcontract/test/panic_test.go +++ b/smartcontract/test/panic_test.go @@ -25,12 +25,12 @@ import ( "os" "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - . "github.com/ontio/ontology/smartcontract" - neovm2 "github.com/ontio/ontology/smartcontract/service/neovm" - "github.com/ontio/ontology/vm/neovm" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + . "github.com/ontio/ontology/v2/smartcontract" + neovm2 "github.com/ontio/ontology/v2/smartcontract/service/neovm" + "github.com/ontio/ontology/v2/vm/neovm" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/preexecutedeploy_test.go b/smartcontract/test/preexecutedeploy_test.go index a43e04d404..5945f30309 100644 --- a/smartcontract/test/preexecutedeploy_test.go +++ b/smartcontract/test/preexecutedeploy_test.go @@ -22,10 +22,10 @@ import ( "os" "testing" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/store/ledgerstore" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/store/ledgerstore" "github.com/stretchr/testify/assert" ) diff --git a/smartcontract/test/verifysig_test.go b/smartcontract/test/verifysig_test.go index 76c70a4a6e..411d783545 100644 --- a/smartcontract/test/verifysig_test.go +++ b/smartcontract/test/verifysig_test.go @@ -23,13 +23,13 @@ import ( "testing" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/smartcontract" - svm "github.com/ontio/ontology/smartcontract/service/neovm" - vtypes "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/smartcontract" + svm "github.com/ontio/ontology/v2/smartcontract/service/neovm" + vtypes "github.com/ontio/ontology/v2/vm/neovm/types" ) func TestVerifySig(t *testing.T) { diff --git a/txnpool/common/transaction_pool.go b/txnpool/common/transaction_pool.go index 1d6a365fde..3979a8c607 100644 --- a/txnpool/common/transaction_pool.go +++ b/txnpool/common/transaction_pool.go @@ -23,12 +23,12 @@ import ( "sort" "sync" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - vt "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + vt "github.com/ontio/ontology/v2/validator/types" ) type TXAttr struct { diff --git a/txnpool/common/transaction_pool_test.go b/txnpool/common/transaction_pool_test.go index 4a983f4900..c49aa77c5f 100644 --- a/txnpool/common/transaction_pool_test.go +++ b/txnpool/common/transaction_pool_test.go @@ -22,9 +22,9 @@ import ( "testing" "time" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" "github.com/stretchr/testify/assert" ) diff --git a/txnpool/common/txnpool_common.go b/txnpool/common/txnpool_common.go index 0e3a134094..b627c349dd 100644 --- a/txnpool/common/txnpool_common.go +++ b/txnpool/common/txnpool_common.go @@ -19,9 +19,9 @@ package common import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" ) const ( diff --git a/txnpool/proc/txnpool_actor.go b/txnpool/proc/txnpool_actor.go index 41be7b7b16..531ecfadc2 100644 --- a/txnpool/proc/txnpool_actor.go +++ b/txnpool/proc/txnpool_actor.go @@ -24,18 +24,18 @@ import ( "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - tx "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/events/message" - hComm "github.com/ontio/ontology/http/base/common" - "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/ontio/ontology/smartcontract/service/neovm" - tc "github.com/ontio/ontology/txnpool/common" - "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + tx "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/events/message" + hComm "github.com/ontio/ontology/v2/http/base/common" + "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + "github.com/ontio/ontology/v2/smartcontract/service/neovm" + tc "github.com/ontio/ontology/v2/txnpool/common" + "github.com/ontio/ontology/v2/validator/types" ) // NewTxActor creates an actor to handle the transaction-based messages from diff --git a/txnpool/proc/txnpool_actor_test.go b/txnpool/proc/txnpool_actor_test.go index 9966673b74..c92f630cf1 100644 --- a/txnpool/proc/txnpool_actor_test.go +++ b/txnpool/proc/txnpool_actor_test.go @@ -23,15 +23,15 @@ import ( "testing" "time" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/events/message" - tc "github.com/ontio/ontology/txnpool/common" - vt "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/events/message" + tc "github.com/ontio/ontology/v2/txnpool/common" + vt "github.com/ontio/ontology/v2/validator/types" "github.com/stretchr/testify/assert" ) diff --git a/txnpool/proc/txnpool_server.go b/txnpool/proc/txnpool_server.go index baf1eceac8..b02e982a1c 100644 --- a/txnpool/proc/txnpool_server.go +++ b/txnpool/proc/txnpool_server.go @@ -28,19 +28,19 @@ import ( "sync" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - tx "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - httpcom "github.com/ontio/ontology/http/base/common" - msgpack "github.com/ontio/ontology/p2pserver/message/msg_pack" - p2p "github.com/ontio/ontology/p2pserver/net/protocol" - params "github.com/ontio/ontology/smartcontract/service/native/global_params" - nutils "github.com/ontio/ontology/smartcontract/service/native/utils" - tc "github.com/ontio/ontology/txnpool/common" - "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + tx "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + httpcom "github.com/ontio/ontology/v2/http/base/common" + msgpack "github.com/ontio/ontology/v2/p2pserver/message/msg_pack" + p2p "github.com/ontio/ontology/v2/p2pserver/net/protocol" + params "github.com/ontio/ontology/v2/smartcontract/service/native/global_params" + nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils" + tc "github.com/ontio/ontology/v2/txnpool/common" + "github.com/ontio/ontology/v2/validator/types" ) type txStats struct { diff --git a/txnpool/proc/txnpool_server_test.go b/txnpool/proc/txnpool_server_test.go index 2e70499d21..1a1edfdb0a 100644 --- a/txnpool/proc/txnpool_server_test.go +++ b/txnpool/proc/txnpool_server_test.go @@ -23,12 +23,12 @@ import ( "time" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - tc "github.com/ontio/ontology/txnpool/common" - "github.com/ontio/ontology/validator/stateless" - vt "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + tc "github.com/ontio/ontology/v2/txnpool/common" + "github.com/ontio/ontology/v2/validator/stateless" + vt "github.com/ontio/ontology/v2/validator/types" "github.com/stretchr/testify/assert" ) diff --git a/txnpool/proc/txnpool_worker.go b/txnpool/proc/txnpool_worker.go index 9ae1df24d4..c4150d603f 100644 --- a/txnpool/proc/txnpool_worker.go +++ b/txnpool/proc/txnpool_worker.go @@ -22,12 +22,12 @@ import ( "sync" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - tx "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - tc "github.com/ontio/ontology/txnpool/common" - "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + tx "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + tc "github.com/ontio/ontology/v2/txnpool/common" + "github.com/ontio/ontology/v2/validator/types" ) // pendingTx contains the transaction, the time of starting verifying, diff --git a/txnpool/proc/txnpool_worker_test.go b/txnpool/proc/txnpool_worker_test.go index c0b6ee5d8e..2bcfa6671b 100644 --- a/txnpool/proc/txnpool_worker_test.go +++ b/txnpool/proc/txnpool_worker_test.go @@ -24,11 +24,11 @@ import ( "testing" "time" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - tc "github.com/ontio/ontology/txnpool/common" - vt "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + tc "github.com/ontio/ontology/v2/txnpool/common" + vt "github.com/ontio/ontology/v2/validator/types" "github.com/stretchr/testify/assert" ) diff --git a/txnpool/server.go b/txnpool/server.go index 00a2862a90..2ba7321647 100644 --- a/txnpool/server.go +++ b/txnpool/server.go @@ -25,10 +25,10 @@ import ( "github.com/ontio/ontology-eventbus/actor" "github.com/ontio/ontology-eventbus/mailbox" - "github.com/ontio/ontology/events" - "github.com/ontio/ontology/events/message" - tc "github.com/ontio/ontology/txnpool/common" - tp "github.com/ontio/ontology/txnpool/proc" + "github.com/ontio/ontology/v2/events" + "github.com/ontio/ontology/v2/events/message" + tc "github.com/ontio/ontology/v2/txnpool/common" + tp "github.com/ontio/ontology/v2/txnpool/proc" ) // startActor starts an actor with the proxy and unique id, diff --git a/txnpool/test/txnpool_test.go b/txnpool/test/txnpool_test.go index 613dbe7986..c7b89bb50d 100644 --- a/txnpool/test/txnpool_test.go +++ b/txnpool/test/txnpool_test.go @@ -25,16 +25,16 @@ import ( "time" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/types" - tc "github.com/ontio/ontology/txnpool/common" - tp "github.com/ontio/ontology/txnpool/proc" - "github.com/ontio/ontology/validator/stateful" - "github.com/ontio/ontology/validator/stateless" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/types" + tc "github.com/ontio/ontology/v2/txnpool/common" + tp "github.com/ontio/ontology/v2/txnpool/proc" + "github.com/ontio/ontology/v2/validator/stateful" + "github.com/ontio/ontology/v2/validator/stateless" ) func TestMain(m *testing.M) { diff --git a/validator/db/best_block.go b/validator/db/best_block.go index bfda66183a..470f387ec3 100644 --- a/validator/db/best_block.go +++ b/validator/db/best_block.go @@ -19,8 +19,8 @@ package db import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" ) type BestBlock struct { diff --git a/validator/db/key_prefix.go b/validator/db/key_prefix.go index d4a143a72a..980ead3243 100644 --- a/validator/db/key_prefix.go +++ b/validator/db/key_prefix.go @@ -21,7 +21,7 @@ package db import ( pool "github.com/valyala/bytebufferpool" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) // DataEntryPrefix diff --git a/validator/db/store.go b/validator/db/store.go index 80c5f10b54..207f499cf1 100644 --- a/validator/db/store.go +++ b/validator/db/store.go @@ -23,10 +23,10 @@ import ( "fmt" "sync" - "github.com/ontio/ontology/common" - storcomm "github.com/ontio/ontology/core/store/common" - leveldb "github.com/ontio/ontology/core/store/leveldbstore" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + storcomm "github.com/ontio/ontology/v2/core/store/common" + leveldb "github.com/ontio/ontology/v2/core/store/leveldbstore" + "github.com/ontio/ontology/v2/core/types" pool "github.com/valyala/bytebufferpool" ) diff --git a/validator/db/transaction_provider.go b/validator/db/transaction_provider.go index 2f08702e1c..098520cae9 100644 --- a/validator/db/transaction_provider.go +++ b/validator/db/transaction_provider.go @@ -19,8 +19,8 @@ package db import ( - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" ) type TransactionProvider interface { diff --git a/validator/increment/increment.go b/validator/increment/increment.go index 3720fe20cc..3053691b72 100644 --- a/validator/increment/increment.go +++ b/validator/increment/increment.go @@ -22,9 +22,9 @@ import ( "fmt" "sync" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/types" ) // IncrementValidator do increment check of transaction diff --git a/validator/stateful/stateful_validator.go b/validator/stateful/stateful_validator.go index 7d89b27864..c65b48ea87 100644 --- a/validator/stateful/stateful_validator.go +++ b/validator/stateful/stateful_validator.go @@ -22,12 +22,12 @@ import ( "reflect" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" - "github.com/ontio/ontology/validator/db" - vatypes "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" + "github.com/ontio/ontology/v2/validator/db" + vatypes "github.com/ontio/ontology/v2/validator/types" ) // Validator is an interface for tx validation actor diff --git a/validator/stateless/stateless_validator.go b/validator/stateless/stateless_validator.go index 8eecc5ac4f..cd9fe5c2c8 100644 --- a/validator/stateless/stateless_validator.go +++ b/validator/stateless/stateless_validator.go @@ -22,9 +22,9 @@ import ( "reflect" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/validation" - vatypes "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/validation" + vatypes "github.com/ontio/ontology/v2/validator/types" ) // Validator wraps validator actor's pid diff --git a/validator/stateless/stateless_validator_test.go b/validator/stateless/stateless_validator_test.go index da21bcaee6..2566956c75 100644 --- a/validator/stateless/stateless_validator_test.go +++ b/validator/stateless/stateless_validator_test.go @@ -23,14 +23,14 @@ import ( "github.com/ontio/ontology-crypto/keypair" "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/signature" - ctypes "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/errors" - types2 "github.com/ontio/ontology/validator/types" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/signature" + ctypes "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/errors" + types2 "github.com/ontio/ontology/v2/validator/types" "github.com/stretchr/testify/assert" ) diff --git a/validator/types/messages.go b/validator/types/messages.go index ce096fd59f..5327af982c 100644 --- a/validator/types/messages.go +++ b/validator/types/messages.go @@ -20,9 +20,9 @@ package types import ( "github.com/ontio/ontology-eventbus/actor" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/errors" ) // message diff --git a/vm/crossvm_codec/codec.go b/vm/crossvm_codec/codec.go index 5ded0dc723..ad937b2b3f 100644 --- a/vm/crossvm_codec/codec.go +++ b/vm/crossvm_codec/codec.go @@ -23,8 +23,8 @@ import ( "math/big" "reflect" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) const ( diff --git a/vm/crossvm_codec/codec_test.go b/vm/crossvm_codec/codec_test.go index 1299ae69af..b5a3e72647 100644 --- a/vm/crossvm_codec/codec_test.go +++ b/vm/crossvm_codec/codec_test.go @@ -22,7 +22,7 @@ import ( "math/big" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/vm/crossvm_codec/notify_codec.go b/vm/crossvm_codec/notify_codec.go index c1bdfd74c4..e5fa9dc30a 100644 --- a/vm/crossvm_codec/notify_codec.go +++ b/vm/crossvm_codec/notify_codec.go @@ -24,8 +24,8 @@ import ( "math/big" "reflect" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" ) func DeserializeNotify(input []byte) interface{} { diff --git a/vm/crossvm_codec/vmcall_codec.go b/vm/crossvm_codec/vmcall_codec.go index 340c73c510..8d9d3ed963 100644 --- a/vm/crossvm_codec/vmcall_codec.go +++ b/vm/crossvm_codec/vmcall_codec.go @@ -21,7 +21,7 @@ package crossvm_codec import ( "bytes" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) //input byte array should be the following format diff --git a/vm/neovm/execution_context.go b/vm/neovm/execution_context.go index 4cc8ae79b5..69b38cc427 100644 --- a/vm/neovm/execution_context.go +++ b/vm/neovm/execution_context.go @@ -21,7 +21,7 @@ package neovm import ( "io" - "github.com/ontio/ontology/vm/neovm/utils" + "github.com/ontio/ontology/v2/vm/neovm/utils" ) type ExecutionContext struct { diff --git a/vm/neovm/executor.go b/vm/neovm/executor.go index 91ac078bae..6a8cd2f15d 100644 --- a/vm/neovm/executor.go +++ b/vm/neovm/executor.go @@ -24,11 +24,11 @@ import ( "fmt" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/vm/neovm/constants" - "github.com/ontio/ontology/vm/neovm/errors" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/vm/neovm/constants" + "github.com/ontio/ontology/v2/vm/neovm/errors" + "github.com/ontio/ontology/v2/vm/neovm/types" "golang.org/x/crypto/ripemd160" ) diff --git a/vm/neovm/executor_test.go b/vm/neovm/executor_test.go index 2137d6df4f..addb23d9c9 100644 --- a/vm/neovm/executor_test.go +++ b/vm/neovm/executor_test.go @@ -21,7 +21,7 @@ package neovm import ( "testing" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/vm/neovm/types" ) func BenchmarkNewExecutor(b *testing.B) { diff --git a/vm/neovm/int_value_test.go b/vm/neovm/int_value_test.go index 7bd5c52b41..315cd01939 100644 --- a/vm/neovm/int_value_test.go +++ b/vm/neovm/int_value_test.go @@ -26,8 +26,8 @@ import ( "math/big" "testing" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/vm/neovm/types" "github.com/stretchr/testify/assert" ) diff --git a/vm/neovm/params_builder.go b/vm/neovm/params_builder.go index 35b6ee36fe..d6fd88d2e4 100644 --- a/vm/neovm/params_builder.go +++ b/vm/neovm/params_builder.go @@ -23,7 +23,7 @@ import ( "encoding/binary" "math/big" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" ) type ParamsBuilder struct { diff --git a/vm/neovm/stack_opcode_test.go b/vm/neovm/stack_opcode_test.go index a529087b16..2d42212f7b 100644 --- a/vm/neovm/stack_opcode_test.go +++ b/vm/neovm/stack_opcode_test.go @@ -29,8 +29,8 @@ import ( "github.com/ontio/ontology-crypto/keypair" s "github.com/ontio/ontology-crypto/signature" - "github.com/ontio/ontology/vm/neovm/interfaces" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/vm/neovm/interfaces" + "github.com/ontio/ontology/v2/vm/neovm/types" "github.com/stretchr/testify/assert" "golang.org/x/crypto/ripemd160" ) diff --git a/vm/neovm/types/array_value.go b/vm/neovm/types/array_value.go index 0a347cbba6..5b2e29b06b 100644 --- a/vm/neovm/types/array_value.go +++ b/vm/neovm/types/array_value.go @@ -19,8 +19,8 @@ package types import ( - "github.com/ontio/ontology/vm/neovm/constants" - "github.com/ontio/ontology/vm/neovm/errors" + "github.com/ontio/ontology/v2/vm/neovm/constants" + "github.com/ontio/ontology/v2/vm/neovm/errors" ) type ArrayValue struct { diff --git a/vm/neovm/types/int_value.go b/vm/neovm/types/int_value.go index 3013fc046b..0734de5bb0 100644 --- a/vm/neovm/types/int_value.go +++ b/vm/neovm/types/int_value.go @@ -23,9 +23,9 @@ import ( "math/big" "github.com/JohnCGriffin/overflow" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/vm/neovm/constants" - "github.com/ontio/ontology/vm/neovm/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/vm/neovm/constants" + "github.com/ontio/ontology/v2/vm/neovm/errors" ) type IntValue struct { diff --git a/vm/neovm/types/interop_value.go b/vm/neovm/types/interop_value.go index 555082c55d..5d8edb4412 100644 --- a/vm/neovm/types/interop_value.go +++ b/vm/neovm/types/interop_value.go @@ -21,7 +21,7 @@ package types import ( "bytes" - "github.com/ontio/ontology/vm/neovm/interfaces" + "github.com/ontio/ontology/v2/vm/neovm/interfaces" ) type InteropValue struct { diff --git a/vm/neovm/types/neovm_value.go b/vm/neovm/types/neovm_value.go index 3c61d8184d..c67141c8b9 100644 --- a/vm/neovm/types/neovm_value.go +++ b/vm/neovm/types/neovm_value.go @@ -27,11 +27,11 @@ import ( "reflect" "sort" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/vm/crossvm_codec" - "github.com/ontio/ontology/vm/neovm/constants" - "github.com/ontio/ontology/vm/neovm/errors" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/vm/crossvm_codec" + "github.com/ontio/ontology/v2/vm/neovm/constants" + "github.com/ontio/ontology/v2/vm/neovm/errors" ) const ( diff --git a/vm/neovm/types/neovm_value_test.go b/vm/neovm/types/neovm_value_test.go index 53680a6818..082dc1a892 100644 --- a/vm/neovm/types/neovm_value_test.go +++ b/vm/neovm/types/neovm_value_test.go @@ -24,7 +24,7 @@ import ( "math/big" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/vm/neovm/types/struct_value.go b/vm/neovm/types/struct_value.go index d7793c68d1..00e14e57c9 100644 --- a/vm/neovm/types/struct_value.go +++ b/vm/neovm/types/struct_value.go @@ -21,8 +21,8 @@ package types import ( "fmt" - "github.com/ontio/ontology/vm/neovm/constants" - "github.com/ontio/ontology/vm/neovm/errors" + "github.com/ontio/ontology/v2/vm/neovm/constants" + "github.com/ontio/ontology/v2/vm/neovm/errors" ) const ( diff --git a/vm/neovm/value_stack.go b/vm/neovm/value_stack.go index 6ae54c2cf4..d5804e82ee 100644 --- a/vm/neovm/value_stack.go +++ b/vm/neovm/value_stack.go @@ -21,8 +21,8 @@ package neovm import ( "fmt" - "github.com/ontio/ontology/vm/neovm/errors" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/vm/neovm/errors" + "github.com/ontio/ontology/v2/vm/neovm/types" ) const initialStackCap = 64 // to avoid reallocation diff --git a/vm/neovm/value_stack_conversion.go b/vm/neovm/value_stack_conversion.go index 2f4f18a191..2d82a2b211 100644 --- a/vm/neovm/value_stack_conversion.go +++ b/vm/neovm/value_stack_conversion.go @@ -19,8 +19,8 @@ package neovm import ( - "github.com/ontio/ontology/vm/neovm/interfaces" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/vm/neovm/interfaces" + "github.com/ontio/ontology/v2/vm/neovm/types" ) func (self *ValueStack) PushBool(val bool) error { diff --git a/vm/neovm/value_stack_test.go b/vm/neovm/value_stack_test.go index dfcd4d7394..b37c0699fe 100644 --- a/vm/neovm/value_stack_test.go +++ b/vm/neovm/value_stack_test.go @@ -22,7 +22,7 @@ import ( "math/big" "testing" - "github.com/ontio/ontology/vm/neovm/types" + "github.com/ontio/ontology/v2/vm/neovm/types" "github.com/stretchr/testify/assert" ) diff --git a/wasmtest/common/common.go b/wasmtest/common/common.go index 9e415ea850..99021c9926 100644 --- a/wasmtest/common/common.go +++ b/wasmtest/common/common.go @@ -21,15 +21,15 @@ import ( "bytes" "encoding/json" - utils2 "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/utils" - common2 "github.com/ontio/ontology/http/base/common" - "github.com/ontio/ontology/smartcontract/states" - - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/core/types" - "github.com/ontio/ontology/vm/neovm" + utils2 "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/utils" + common2 "github.com/ontio/ontology/v2/http/base/common" + "github.com/ontio/ontology/v2/smartcontract/states" + + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/core/types" + "github.com/ontio/ontology/v2/vm/neovm" ) type TestEnv struct { diff --git a/wasmtest/common/common_test.go b/wasmtest/common/common_test.go index f3004fed2a..c7b1e3171c 100644 --- a/wasmtest/common/common_test.go +++ b/wasmtest/common/common_test.go @@ -21,7 +21,7 @@ import ( "encoding/json" "testing" - "github.com/ontio/ontology/common" + "github.com/ontio/ontology/v2/common" "github.com/stretchr/testify/assert" ) diff --git a/wasmtest/wasm-test.go b/wasmtest/wasm-test.go index 8f0128eb94..11f5e43e50 100644 --- a/wasmtest/wasm-test.go +++ b/wasmtest/wasm-test.go @@ -33,25 +33,25 @@ import ( "strings" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology/account" - "github.com/ontio/ontology/cmd/utils" - "github.com/ontio/ontology/common" - "github.com/ontio/ontology/common/config" - "github.com/ontio/ontology/common/constants" - "github.com/ontio/ontology/common/log" - "github.com/ontio/ontology/core/genesis" - "github.com/ontio/ontology/core/ledger" - "github.com/ontio/ontology/core/payload" - "github.com/ontio/ontology/core/signature" - "github.com/ontio/ontology/core/store/ledgerstore" - "github.com/ontio/ontology/core/types" - utils2 "github.com/ontio/ontology/core/utils" - "github.com/ontio/ontology/events" - common2 "github.com/ontio/ontology/http/base/common" - "github.com/ontio/ontology/smartcontract/service/wasmvm" - "github.com/ontio/ontology/smartcontract/states" - vmtypes "github.com/ontio/ontology/vm/neovm/types" - common3 "github.com/ontio/ontology/wasmtest/common" + "github.com/ontio/ontology/v2/account" + "github.com/ontio/ontology/v2/cmd/utils" + "github.com/ontio/ontology/v2/common" + "github.com/ontio/ontology/v2/common/config" + "github.com/ontio/ontology/v2/common/constants" + "github.com/ontio/ontology/v2/common/log" + "github.com/ontio/ontology/v2/core/genesis" + "github.com/ontio/ontology/v2/core/ledger" + "github.com/ontio/ontology/v2/core/payload" + "github.com/ontio/ontology/v2/core/signature" + "github.com/ontio/ontology/v2/core/store/ledgerstore" + "github.com/ontio/ontology/v2/core/types" + utils2 "github.com/ontio/ontology/v2/core/utils" + "github.com/ontio/ontology/v2/events" + common2 "github.com/ontio/ontology/v2/http/base/common" + "github.com/ontio/ontology/v2/smartcontract/service/wasmvm" + "github.com/ontio/ontology/v2/smartcontract/states" + vmtypes "github.com/ontio/ontology/v2/vm/neovm/types" + common3 "github.com/ontio/ontology/v2/wasmtest/common" "github.com/ontio/wagon/exec" "github.com/ontio/wagon/wasm" )