OSDN Git Service

Refactor bytomcli via cobra (#222)
authorLiu-Cheng Xu <xuliuchengxlc@gmail.com>
Tue, 2 Jan 2018 11:41:39 +0000 (19:41 +0800)
committerGuanghua Guo <1536310027@qq.com>
Tue, 2 Jan 2018 11:41:39 +0000 (19:41 +0800)
commit44b3132b06c188ced38c675554a10a5715dce159
treeb01edc5cd6e8f1230aa49da5d98d58b111ac81e9
parentfb556b8e130b82dc038bbc8298f5e4b3f468c8cf
Refactor bytomcli via cobra (#222)

* Fix rpc server error (#195)

* Reduce code duplication

* Add exit code

- add exit code for various exceptions.

* Exit after clientCall

* Refactor list-keys and delete-key

* Refactor list-accounts

* Refactor list-assets, add delete-account, etc

* Refactor update-account-tags

* Refactor cmds about access token

* Add txfeed related commands

- also a bit refactor.

* Delete jsend

* Resolve merge conflicts

* Add new files

* Pass golint

* Refactor create account receiver

* Refine commands help

* Use interface{} type instead of []string

* Refactor list-transactions,list-balances and list-unspent-outputs

* Refactor build-transaction

* Refactor sign-transaction and submit-transaction

* Replace bytomcli with cobra

* new branch base

* Refactor multiple commands

Updated:
- block-height
- is-mining
- gas-rate

Removed(bytomd):
- net-listening
- net-syncing
- peer-count

* Update block-related commands

* Refactor list cmd

* Update create-key and create-access-token

* Update txfeed

* Try to fix commit update

* build-transaction and sign-transaction

* code clean and unit-test

* Add cmd sign-submit-transaction

* List assets

* Use id instead of tx_id

* list one entry by id

* Delete transaction index

* Don't return error when no data

* Remove useless files

* List transactions by account id

* Format json tag

* Add asset alias on list-balances

* Add asset alias on list-unspent-outputs

* Add create-account-receiver experimentally

* Add account alias on list-unspent-outputs

* Update according to the preview review

* Revert accesstoken

* Delete useless code

* Rename to bcr

* Support build tramsaction by alias

* Add error log in pseudohsmSignTemplate

* Fix build spend transaction template

* Change dashboard

* Change dashboard.go

* Add btm alias

* Support retire transaction

* Refine net-info

* update dashboard.go

* update dashboard.go

* Support create account by multi-sign

* Multi-signature is avaliable

* Chang error code name

* update dashboard.go

* Update README.md roughly

* update dashboard.go by fixing build transaction with receiver

* Update README.md

* update dashboard.go by fixing create account/asset
63 files changed:
Dockerfile [changed mode: 0644->0755]
README.md
blockchain/accesstokens.go
blockchain/account/accounts.go
blockchain/account/builder.go [changed mode: 0644->0755]
blockchain/account/indexer.go
blockchain/account/receivers.go
blockchain/accounts.go
blockchain/asset/asset.go
blockchain/asset/builder.go [changed mode: 0644->0755]
blockchain/assets.go
blockchain/blockchain_reactor.go
blockchain/control_programs.go
blockchain/errors.go
blockchain/hsm.go
blockchain/jsend.go [deleted file]
blockchain/pseudohsm/pseudohsm.go
blockchain/pseudohsm/pseudohsm_test.go
blockchain/query.go
blockchain/query/annotated.go
blockchain/query/filter/expr.go [changed mode: 0644->0755]
blockchain/reactor.go
blockchain/receivers.go
blockchain/request.go
blockchain/rpc.go
blockchain/rpc_reactor.go
blockchain/transact.go
blockchain/txbuilder/txbuilder.go
blockchain/txbuilder/types.go
blockchain/txfeed/txfeed.go [changed mode: 0644->0755]
blockchain/txfeeds.go
blockchain/wallet.go
blockchain/wallet/annotated.go
blockchain/wallet/indexer.go [changed mode: 0644->0755]
blockchain/wallet/wallet.go
cmd/bytomcli/commands/accesstoken.go [new file with mode: 0755]
cmd/bytomcli/commands/account.go [new file with mode: 0755]
cmd/bytomcli/commands/asset.go [new file with mode: 0755]
cmd/bytomcli/commands/block.go [new file with mode: 0755]
cmd/bytomcli/commands/bytomcli.go [moved from cmd/cobra/commands/bytomcli.go with 74% similarity]
cmd/bytomcli/commands/key.go [new file with mode: 0644]
cmd/bytomcli/commands/mining.go [new file with mode: 0644]
cmd/bytomcli/commands/net.go [new file with mode: 0644]
cmd/bytomcli/commands/transaction.go [new file with mode: 0644]
cmd/bytomcli/commands/txfeed.go [new file with mode: 0755]
cmd/bytomcli/commands/util.go [new file with mode: 0644]
cmd/bytomcli/commands/version.go [moved from cmd/cobra/commands/version.go with 100% similarity]
cmd/bytomcli/example/issue.go [deleted file]
cmd/bytomcli/example/spend.go [deleted file]
cmd/bytomcli/example/wallet.go [deleted file]
cmd/bytomcli/main.go [changed mode: 0755->0644]
cmd/bytomcli/test/transaction_test [new file with mode: 0755]
cmd/cobra/commands/accesstoken.go [deleted file]
cmd/cobra/commands/account.go [deleted file]
cmd/cobra/commands/asset.go [deleted file]
cmd/cobra/commands/block.go [deleted file]
cmd/cobra/commands/key.go [deleted file]
cmd/cobra/commands/mining.go [deleted file]
cmd/cobra/commands/net.go [deleted file]
cmd/cobra/commands/transaction.go [deleted file]
cmd/cobra/commands/txfeed.go [deleted file]
cmd/cobra/main.go [deleted file]
dashboard/dashboard.go