OSDN Git Service

bytom/bytom.git
6 years agoMerge pull request #564 from Bytom/dev v0.4.3
Yongfeng LI [Tue, 10 Apr 2018 03:08:39 +0000 (11:08 +0800)]
Merge pull request #564 from Bytom/dev

merge Dev

6 years agoupdate version (#565)
Yongfeng LI [Tue, 10 Apr 2018 02:58:12 +0000 (10:58 +0800)]
update version (#565)

6 years agofix the tx size bug (#563)
Paladz [Tue, 10 Apr 2018 02:48:36 +0000 (10:48 +0800)]
fix the tx size bug (#563)

* fix the tx size bug

* fix small garmmar

6 years agoprevent tx size is 0 (#562)
Paladz [Mon, 9 Apr 2018 11:26:16 +0000 (19:26 +0800)]
prevent tx size is 0 (#562)

* prevent tx size is 0

* make unit test pass

6 years agoMerge pull request #561 from Bytom/p2p-bug
Yongfeng LI [Mon, 9 Apr 2018 09:09:53 +0000 (17:09 +0800)]
Merge pull request #561 from Bytom/p2p-bug

fix stop peer when request block failed

6 years agofix stop peer when request block failed
Yongfeng LI [Mon, 9 Apr 2018 08:40:50 +0000 (16:40 +0800)]
fix stop peer when request block failed

6 years agofix SyncManager Peer and Switch peer not match (#560)
Yongfeng LI [Mon, 9 Apr 2018 07:49:46 +0000 (15:49 +0800)]
fix SyncManager Peer and Switch peer not match (#560)

6 years agofix the store block header index bug (#559)
Paladz [Mon, 9 Apr 2018 07:01:39 +0000 (15:01 +0800)]
fix the store block header index bug (#559)

6 years agoFrozen bc (#552)
Paladz [Mon, 9 Apr 2018 06:15:05 +0000 (14:15 +0800)]
Frozen bc (#552)

* first step clean the nonce

* clean the map.go

* clean the data from bc.go

* finish clean the data from bc level

* add unit test for map

* add comment for golint

6 years agochmod -x for source files (#557)
HAOYUatHZ [Mon, 9 Apr 2018 05:07:34 +0000 (13:07 +0800)]
chmod -x for source files (#557)

keep `x` for `.pl`, `.sh`, `.bash` and `.git/hooks/*.sample`

```
find . -type f -perm -111

find . -name "*.go" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.s" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.h" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.c" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.f" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.f90" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.json.deflate" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.dat" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.txt" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.md" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.html" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.xml" -type f -perm -111 -exec chmod -x {} \;
find . -name "Makefile" -type f -perm -111 -exec chmod -x {} \;
find . -name "Dockerfile" -type f -perm -111 -exec chmod -x {} \;
find . -name "README" -type f -perm -111 -exec chmod -x {} \;
find . -name "AUTHORS" -type f -perm -111 -exec chmod -x {} \;
find . -name "LICENSE" -type f -perm -111 -exec chmod -x {} \;
find . -name "PATENTS" -type f -perm -111 -exec chmod -x {} \;
find . -name "CONTRIBUTORS" -type f -perm -111 -exec chmod -x {} \;
find . -name "AUTHORS" -type f -perm -111 -exec chmod -x {} \;
find . -name ".gitignore" -type f -perm -111 -exec chmod -x {} \;
find . -name ".gitattributes" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.gz" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.cfg" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.pem" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.key" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.srl" -type f -perm -111 -exec chmod -x {} \;
find . -name "*.crt" -type f -perm -111 -exec chmod -x {} \;
```

6 years agofix keys not update when reloading with some keys deleted (#556)
Yongfeng LI [Mon, 9 Apr 2018 05:02:54 +0000 (13:02 +0800)]
fix keys not update when reloading with some keys deleted (#556)

6 years agoMerge pull request #551 from Bytom/update-readme
Yongfeng LI [Sun, 8 Apr 2018 14:24:48 +0000 (22:24 +0800)]
Merge pull request #551 from Bytom/update-readme

fix grammar error. #530

6 years agoMerge pull request #550 from Bytom/fix-maxNonce-comment
Yongfeng LI [Sun, 8 Apr 2018 14:21:34 +0000 (22:21 +0800)]
Merge pull request #550 from Bytom/fix-maxNonce-comment

fix maxNonce comment

6 years agofix grammar error. #530
HAOYUatHZ [Sun, 8 Apr 2018 11:37:44 +0000 (19:37 +0800)]
fix grammar error. #530

6 years agofix-maxNonce-comment
HAOYUatHZ [Sun, 8 Apr 2018 11:27:33 +0000 (19:27 +0800)]
fix-maxNonce-comment

6 years agofix get reorganize blocks stuck (#549)
WangYifu [Sun, 8 Apr 2018 11:07:10 +0000 (06:07 -0500)]
fix get reorganize blocks stuck (#549)

6 years agoRemove unused code (#548)
Yongfeng LI [Sun, 8 Apr 2018 09:59:39 +0000 (17:59 +0800)]
Remove unused code (#548)

* remove unused code in accoun and api

* remove unused code in crypto

* remove unused code in asset and protocol

6 years agoadd logs for debug (#545)
Paladz [Sun, 8 Apr 2018 08:15:38 +0000 (16:15 +0800)]
add logs for debug (#545)

6 years agoMerge pull request #546 from Bytom/gofmt
Yongfeng LI [Sun, 8 Apr 2018 07:51:06 +0000 (15:51 +0800)]
Merge pull request #546 from Bytom/gofmt

gofmt source

6 years agogofmt source
Yongfeng LI [Sun, 8 Apr 2018 07:44:05 +0000 (15:44 +0800)]
gofmt source

6 years agoBlock node (#541)
Paladz [Sun, 8 Apr 2018 07:17:26 +0000 (15:17 +0800)]
Block node (#541)

* separate orphan manage from protocol

* savage version of blockIndex

* elegent the blockindex

* eleganet the leveldb part

* make it runable on single node

* pass the make test

* process use channel

* make the connect block safe from async

6 years agofix tx actions only contain spend and will be success (#544)
oysheng [Sun, 8 Apr 2018 06:28:21 +0000 (14:28 +0800)]
fix tx actions only contain spend and will be success (#544)

* fix tx actions only contain spend and tx will be success

* modify func name

6 years agoMerge pull request #542 from Bytom/reverse-tx
Yongfeng LI [Sat, 7 Apr 2018 11:09:25 +0000 (19:09 +0800)]
Merge pull request #542 from Bytom/reverse-tx

reverse result of list-transactions

6 years agoimprove the way to reverse transactions
Yongfeng LI [Sat, 7 Apr 2018 11:00:35 +0000 (19:00 +0800)]
improve the way to reverse transactions

6 years agoreverse result of list-transactions
Yongfeng LI [Sat, 7 Apr 2018 10:54:45 +0000 (18:54 +0800)]
reverse result of list-transactions

6 years agoOptimize p2p transfer business layer logic (#501)
yahtoo [Sat, 7 Apr 2018 08:05:35 +0000 (16:05 +0800)]
Optimize p2p transfer business layer logic (#501)

* Optimize p2p business layer logic

* Merge dev branch code

* Fix new mined block can't broadcast error

* Remove unused test file

* Del unused parameter

* Add RWMutex

* Add sent message filter

* Fix request block quite bug

* Del unused function BroadcastToPeers

* Fix new peer channel bug

* Del chainHeight from blockKeeper

* Fix sync check logic bug

* Add business protocol handshake

* Del unused code

* Optimize code format

* Del unused function

* Refactor request block by hash/height function

* Refactor tx notify handle

* Refactor BlockRequestWorker to sequential process

* Fix net bestheight error

* Refactor p2p net sync code

* Refactor p2p net sync code

* Refactor BlockRequestWorker of blockkeeper

* ValidateTx return orphan flag

* For p2p transfer test

* For p2p transfer test

* Check exist block whether orphan

* Enable peer exchange function default

* Add txpool sync when new peer connected

* Fix golint check error

* Change mine difficulty

* Fix requst genesis block bug

* Fix address compare function

* Fix blockrequest bug

* Revert "For p2p transfer test"

This reverts commit e6a36d86d5077f6c520dbfbb6eee2ab4335012e5.

* Fix request block bug

* For test

* Fix code review problem

* Optimize log printing

* Fix ci check error

6 years agorefactor get account utxo api (#538)
Yongfeng LI [Fri, 6 Apr 2018 10:08:38 +0000 (18:08 +0800)]
refactor get account utxo api (#538)

6 years agorefactor Wallet#indexTransactions (#537)
Yongfeng LI [Fri, 6 Apr 2018 09:04:28 +0000 (17:04 +0800)]
refactor Wallet#indexTransactions (#537)

6 years agoStatic types (#529)
Paladz [Fri, 6 Apr 2018 07:16:27 +0000 (15:16 +0800)]
Static types (#529)

* tmp save before change the issuance noce

* work on static issuance stuff

* frozen the txinput

* frozen txout

* ready for unit test

* add unit test for spend

* add unit test for output_commitment

* fix wrong log

* add unit test for txoutput

* add unit test for issuance input

* add unit test for spend input

* add unit test for coinbase

* add unit test for transactino

* delete tx_test.go due to already been handled

* add unit test for block

* fix bug for serialized tx size

* finish the types level test

6 years agoremove controlAction#ReferenceData (#536)
Yongfeng LI [Fri, 6 Apr 2018 02:38:35 +0000 (10:38 +0800)]
remove controlAction#ReferenceData (#536)

6 years agoAdd test cases and comments for difficulty package. (#535)
HAOYUatHZ [Thu, 5 Apr 2018 08:17:30 +0000 (16:17 +0800)]
Add test cases and comments for difficulty package. (#535)

* init hash bytes for tests

* fix test case structs

* pass HashToBig

* update format

* update comments for CompactToBig(compact uint64) *big.Int

* pause

* basic test for TestCompactToBig

* pause

* update output format

* update comments

* trying btcd's test cases

* weird

* Add comments for  (*Int) Bytes()

* Add test cases for BigToCompact()

* weird

* pause

* Update comments

* Cleaning up. Start to try less shifting.

* Update test cases

* udpate comments

* need to fix types

* fix type

* Add test cases

* Add test cases

* Add test cases and comments.

* formatted & linted

6 years agoupdate dashboard (#533)
Yongfeng LI [Wed, 4 Apr 2018 08:55:19 +0000 (16:55 +0800)]
update dashboard (#533)

6 years agoMerge pull request #532 from Bytom/import-key-progress
Yongfeng LI [Wed, 4 Apr 2018 06:47:13 +0000 (14:47 +0800)]
Merge pull request #532 from Bytom/import-key-progress

fix key import progress

6 years agofix key import progress
Yongfeng LI [Wed, 4 Apr 2018 06:34:34 +0000 (14:34 +0800)]
fix key import progress

6 years agofix asset alias for upper (#528)
wz [Tue, 3 Apr 2018 13:17:23 +0000 (21:17 +0800)]
fix asset alias for upper (#528)

6 years agofix AnnotatedOutput#AssetDefinition type (#525)
Yongfeng LI [Tue, 3 Apr 2018 12:24:17 +0000 (20:24 +0800)]
fix AnnotatedOutput#AssetDefinition type (#525)

6 years agoupdate dashboard (#523)
Yongfeng LI [Tue, 3 Apr 2018 10:58:19 +0000 (18:58 +0800)]
update dashboard (#523)

6 years agoadd xpubs out of bounds check (#522)
oysheng [Tue, 3 Apr 2018 08:26:52 +0000 (16:26 +0800)]
add xpubs out of bounds check (#522)

6 years agoonly run `make test` in travis ci (#521)
Yongfeng LI [Tue, 3 Apr 2018 03:03:17 +0000 (11:03 +0800)]
only run `make test` in travis ci (#521)

6 years agofix style with goimports except p2p directory (#520)
Yongfeng LI [Tue, 3 Apr 2018 02:57:06 +0000 (10:57 +0800)]
fix style with goimports except p2p directory (#520)

6 years agoMerge pull request #519 from Bytom/dev v0.4.2
Yongfeng LI [Mon, 2 Apr 2018 12:35:53 +0000 (20:35 +0800)]
Merge pull request #519 from Bytom/dev

merge dev to master

6 years agoRevert "update master (#487)" (#518)
Yongfeng LI [Mon, 2 Apr 2018 12:29:15 +0000 (20:29 +0800)]
Revert "update master (#487)" (#518)

This reverts commit 01180396e6e36d20c8a666286c985637e6186bfd.

6 years agoupdate version (#516)
Yongfeng LI [Mon, 2 Apr 2018 12:13:33 +0000 (20:13 +0800)]
update version (#516)

6 years agoadd api handler test and fix walletRedirectHandler (#514)
oysheng [Mon, 2 Apr 2018 10:45:02 +0000 (18:45 +0800)]
add api handler test and fix walletRedirectHandler  (#514)

* add asset unit test: TestUpdateAssetAlias and TestListAssets

* fix walletRedirectHandler because cannot modify req.URL.Path out of http.Handler
add api unit test

* optimse api test

6 years agofix .travis.yml (#515)
Yongfeng LI [Mon, 2 Apr 2018 09:16:35 +0000 (17:16 +0800)]
fix .travis.yml (#515)

6 years agofix make release for windows (#512)
Yongfeng LI [Mon, 2 Apr 2018 06:39:38 +0000 (14:39 +0800)]
fix make release for windows (#512)

6 years agoinit version for make submit work handle asyn case (#511)
Paladz [Mon, 2 Apr 2018 06:06:34 +0000 (14:06 +0800)]
init version for make submit work handle asyn case (#511)

* init version for make submit work handle asyn case

* edit for golint and test

* change the channel size due to code review

6 years agoinline open browser utility method (#510)
Yongfeng LI [Mon, 2 Apr 2018 03:02:12 +0000 (11:02 +0800)]
inline open browser utility method (#510)

6 years agoadd asset unit test: TestUpdateAssetAlias and TestListAssets (#509)
oysheng [Sat, 31 Mar 2018 08:27:29 +0000 (16:27 +0800)]
add asset unit test: TestUpdateAssetAlias and TestListAssets (#509)

6 years agofix dashboard balance keep show loading when account no balance (#508)
Yongfeng LI [Sat, 31 Mar 2018 05:45:51 +0000 (13:45 +0800)]
fix dashboard balance keep show loading when account no balance (#508)

6 years agoedit api for get-work and submit work (#507)
Paladz [Sat, 31 Mar 2018 05:00:04 +0000 (13:00 +0800)]
edit api for get-work and submit work (#507)

6 years agofix ErrLoadKey in multi-sig witness (#506)
WangYifu [Fri, 30 Mar 2018 11:58:24 +0000 (19:58 +0800)]
fix ErrLoadKey in multi-sig witness (#506)

6 years agoadd rpc test (#503)
oysheng [Fri, 30 Mar 2018 10:51:22 +0000 (18:51 +0800)]
add rpc test (#503)

* add rpc test
delete the no used function NetInfo

* fix BTM format fot transaction request

6 years agodelete tls.go (#504)
Yongfeng LI [Fri, 30 Mar 2018 10:14:59 +0000 (18:14 +0800)]
delete tls.go (#504)

6 years agonormalize alias capitalization (#502)
Yongfeng LI [Fri, 30 Mar 2018 08:04:23 +0000 (16:04 +0800)]
normalize alias capitalization (#502)

* normalize alias capitalization

* remove ToUpper when compare with BTMAlias

* add test for create asset with alias BTM

* add test for convert alias captalization

6 years agoinit push for tx status hash use merkle tree (#499)
Paladz [Fri, 30 Mar 2018 01:58:09 +0000 (09:58 +0800)]
init push for tx status hash use merkle tree (#499)

* init push for tx status hash use merkle tree

* fix for unit test

* merkle tree func use intergace

6 years agoadd gzip to API handler (#497)
Yongfeng LI [Wed, 28 Mar 2018 07:36:45 +0000 (15:36 +0800)]
add gzip to API handler (#497)

6 years agoremove wallet from BlockchainReactor (#496)
Yongfeng LI [Wed, 28 Mar 2018 06:13:23 +0000 (14:13 +0800)]
remove wallet from BlockchainReactor (#496)

6 years agoadd lock to create-key (#495)
Yongfeng LI [Wed, 28 Mar 2018 05:58:33 +0000 (13:58 +0800)]
add lock to create-key (#495)

6 years agofix maxNonce comment (#491)
Yongfeng LI [Tue, 27 Mar 2018 07:51:46 +0000 (15:51 +0800)]
fix maxNonce comment (#491)

6 years agofix warning: "http: multiple response.WriteHeader calls" (#490)
oysheng [Tue, 27 Mar 2018 07:22:53 +0000 (15:22 +0800)]
fix warning: "http: multiple response.WriteHeader calls" (#490)

6 years agoinit push for verify seed (#488)
Paladz [Tue, 27 Mar 2018 06:52:51 +0000 (14:52 +0800)]
init push for verify seed (#488)

6 years agoupdate master (#487)
Yongfeng LI [Mon, 26 Mar 2018 10:45:14 +0000 (18:45 +0800)]
update master (#487)

* Sign process (#371)

* support sign between different node

* fix for golint

* sign password doesn't need array any more

* update dashboard (#379)

1. transaction pagination
2. simplify new transaction
3. i18n
4. expose new transaction advanced setting
5. fix bugs

* Skip p2p tests (#385)

Skip all the tests in p2p when running `go test`.

* p2sh use RawWitnessKeys (#386)

* p2sh use RawWitnessKeys

* change test key name for fix delay issue

* edit test dir name

* Automize the compilation of cross platform binary application (#387)

* Automize the compilation of cross platform binary application

* Add the default target

* Add phony

* Ingore target

* Refactor release target

* init version of edit block header (#389)

* init version of edit block header

* elegant the code a little bit

* fix isssue error

* Add md5 check (#398)

* init version of charge tx size gas (#394)

* init version of charge tx size gas

* edit the code a little bit

* change the storage gate rate

* fix a tx size bug

* fix for code review

* Disable colored logging

* Mining pool (#403)

* revert the cpu miner

* init version of minepool

* fix bug

* edit the test function

* fix the werid mutex issue

* change the name from minepool to miningpool

* fix check reward api

* change the api url

* change the url

* add make bytomd to make file (#404)

* fix import private key (#405)

* fix multi-sign account index (#407)

* fix multi-sign account index

* normalize multi-sign account index db key

* Add p2p network manager function (#397)

* Add p2p network manager function

* Adjust the code logic

* Optimize code

* Dev mining (#390)

* update

* update

* delete comment

* update tensority, same with c++

* add smix.go

* tensority is right

* add TestHash()

* add TestCalcSeedCache

* add TestCalcSeedCache

* Update scrypt.go

* mining/tensority: Time & space opt for dataIdentity[] init in mulMatrix()

* clean up code

* clean up codes

* remove hexutil files

* update tensority test

* edit get reward respone (#406)

* edit get reward respone

* delete used para in resp

* add the get-block-header-by-height api

* add a test cmd function

* update GenesisBlock nounce (#409)

* Getwork (#410)

* edit the getwork api

* edit the cmd miner work function

* rename the file from mempool.go -> txpool.go (#411)

* Seed (#415)

* add seed generate rule

* edit the getWork resp

* add golint

* Remove transaction reference data (#416)

* remove transaction level ReferenceData

* remove setTxRefDataAction

* remove ExtHash in TxHeader

* fix the unit wallet unit test

* remove the vm txdata opcode

* clean the txbuild due to we don't have txData any more

* wallet add contract utxo db (#414)

* standard transaction reserve utxo filter out contract utxo

* distinguish StandardUTXO and ContractUTXO
modfiy spendUTXOAction into no account, the contract utxo is not need to sign
wallet add contract utxo db
adjust function parameter format: the end of parameter is error

* delete ExtContractTag because contract utxo is stored in ContractUTXO

* spendUTXOAction add situation when account is empty
prevoutDBKeys delete return value
filterAccountTxs filter contract transaction to reduce unrelated transaction

* fix golint for blockchain/account/reserve.go

* optimise the import

* fix import issue (#417)

* adjust format for golint  (#419)

* standard transaction reserve utxo filter out contract utxo

* distinguish StandardUTXO and ContractUTXO
modfiy spendUTXOAction into no account, the contract utxo is not need to sign
wallet add contract utxo db
adjust function parameter format: the end of parameter is error

* delete ExtContractTag because contract utxo is stored in ContractUTXO

* spendUTXOAction add situation when account is empty
prevoutDBKeys delete return value
filterAccountTxs filter contract transaction to reduce unrelated transaction

* fix golint for blockchain/account/reserve.go

* optimise the import

* adjust format for golint

* adjust format

* Hash static len (#422)

* edit hash uint64 method

* edit unit test

* simplify next account index in account manager (#423)

* Remove reference data in TxInput & TxOutput (#420)

* remove ReferenceData in spendAction

* remove referenceData in controlAddressAction

* remove ReferenceData in controlReceiverAction and controlProgramAction

* remove ReferenceData in issueAction

* remove ReferenceData in spendUTXOAction and retireAction

* remove ReferenceData in TxInput

* fix typo

* fix validation_test

* remove ReferenceData in TxOutput

* remove more reference data

* remove RefDataHash in rawOutput

* delete the txinput/output vm level op

* delete unnecessary log (#424)

* standard transaction reserve utxo filter out contract utxo

* distinguish StandardUTXO and ContractUTXO
modfiy spendUTXOAction into no account, the contract utxo is not need to sign
wallet add contract utxo db
adjust function parameter format: the end of parameter is error

* delete ExtContractTag because contract utxo is stored in ContractUTXO

* spendUTXOAction add situation when account is empty
prevoutDBKeys delete return value
filterAccountTxs filter contract transaction to reduce unrelated transaction

* fix golint for blockchain/account/reserve.go

* optimise the import

* adjust format for golint

* adjust format

* add the function illustration

* delete unnecessary log

* rename create-account-address to create-account-receiver (#426)

* rename create-account-address to create-account-receiver

* update dashboard

* remove RefDataHash in SpendCommitment and UTXO (#428)

* remove RefDataHash in SpendCommitment

* remove RefDataHash in UTXO

* remove RefDataHash in annotatedUTXO

* create key and account in bytomd init (#425)

* create key and account in bytomd init

* init key and account when launch node

* refactor init account process

* fix init or recover account process

* remove useless accounts check

* remove some useless fields in node struct (#429)

* set default password to default account (#430)

* remove InitialBlockHash in Asset (#431)

* remove InitialBlockHash in Asset

* remove InitialBlockId of AssetDefinition

* rename create-account-address command (#432)

* Rename legacy (#433)

* remove external useless types

* rename legacy package to types

* remove Signer#Find (#435)

* Repalce tp with mp (#434)

Standardize the naming rule

* ignore File field when marshal XPub (#436)

* return AnnotatedAccount for list-accounts api (#437)

* simplify singers#Create (#438)

* remove useless code in blockchain/reactor.go (#441)

* add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

* Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

* init push for add newBlockCh for p2p (#443)

* init push for validate-address API (#444)

* init push for list address (#445)

* fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

* put hsm from BlockchainReactor to Wallet (#451)

* put token management from BlockchainReactor to Wallet (#452)

* init push for submit-tx (#450)

* modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

* edit the create-address api (#453)

* edit the create-address api

* update dashboard

* add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

*  bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* bugfix: disable wallet panic (#456)

* make test build failed (#457)

* modify reset-key-password api (#459)

* git# This is a combination of 18 commits.
fix json name for submit transaction

remove useless code in blockchain/reactor.go (#441)

add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

init push for add newBlockCh for p2p (#443)

init push for validate-address API (#444)

init push for list address (#445)

fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

put hsm from BlockchainReactor to Wallet (#451)

put token management from BlockchainReactor to Wallet (#452)

init push for submit-tx (#450)

modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

bytomcli add validate-address and list-addresses

edit the create-address api (#453)

* edit the create-address api

* update dashboard

add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* add reset-key-password

*  refactor node server (#460)

* remove NewNodeDefault

* refactor node start server

* list-addresses response add account_alias (#462)

* git# This is a combination of 18 commits.
fix json name for submit transaction

remove useless code in blockchain/reactor.go (#441)

add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

init push for add newBlockCh for p2p (#443)

init push for validate-address API (#444)

init push for list address (#445)

fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

put hsm from BlockchainReactor to Wallet (#451)

put token management from BlockchainReactor to Wallet (#452)

init push for submit-tx (#450)

modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

bytomcli add validate-address and list-addresses

edit the create-address api (#453)

* edit the create-address api

* update dashboard

add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* add reset-key-password

* list-addresses response add account_alias
modify bytomcli create-account-receiver

* remove serveHTTP and mux from BlockchainReactor (#463)

* remove serveHTTP of BlockchainReactor

* remove mux from BlockchainReactor

* refactor handler related tests (#464)

* refactor handler related tests

* fix imports

* add timerange to txbuilder (#461)

* add timerange to txbuilder

* timerange support block height

* add notes to timeRangeGash

* refactor list-unspent-outputs (#465)

* edit reset passowrd api (#467)

* modify bytomcli interface submit-transaction (#466)

modify password format

* add API struct (#468)

* rename rpc_reactor to api

* create API struct

* move server to API

* move buildHandler to API

* refactor initServer

* remove BlockchainReactor Handler

* move request handle methods to API struct (#470)

* move account related request handle methods to API

* move asset related request methods to API

* move hsm related request methods to API

* move other request methods to API

* list-addresses add filter by accountID pr accountAlias (#469)

* list-addresses add filter by accountID pr accountAlias

* optimse

* init push for static mining address (#471)

* init push for static mining address

* fix for code review

* Refactor api (#472)

* move listAccounts to API

* add chain to API

* call walllet from API directly

* move NewSuccessResponse and NewErrorResponse to api.go

* move several packages out of blockchain (#473)

* move account package out of blockchain

* move asset package out of blockchain

* move accesstoken out of blockchain

* move wallet package out of blockchain

* remove rpc package (#474)

* Revert "remove rpc package (#474)" (#475)

This reverts commit c0563a5d0953c00d86885c4d11d0ca7fdb19c090.

* modify the folder struct (#476)

* make some fields of BlockchainReactor public to facilitate separate API (#477)

* move maxBytesHandler to api.go

* move Response to api.go

* call chain from api directly

* not call BlockchainReactor inner methods from API

* make BlockchainReactor txFeedTracker public

* extract api from blockchain (#478)

* trim alias space before creating account, key and asset (#480)

* trim alias space before creating account, key and asset

* trim alias white space when creating account, asset and key

* Block min time (#481)

* tmp save

* tmp save

* add block timestamp range check

* fix for test

* improve some code (#482)

* fix build failure (#484)

* remove error check of GetBlockByHash in SaveBlock (#485)

* when wallet disable, wallet related api redirect to error (#483)

*  *when wallet disable, accesstoken can be call
 *redirect url path to wait-disable when wallet is closed

* fix redirect path to error when wallet is disable

*  move accesstoken from wallet into API

* modify handler value

* add function walletRedirectHandler for latencyHandler

* fix wallet_test (#486)

6 years agofix wallet_test (#486)
Yongfeng LI [Mon, 26 Mar 2018 10:27:34 +0000 (18:27 +0800)]
fix wallet_test (#486)

6 years agowhen wallet disable, wallet related api redirect to error (#483)
oysheng [Mon, 26 Mar 2018 09:34:44 +0000 (17:34 +0800)]
when wallet disable, wallet related api redirect to error (#483)

*  *when wallet disable, accesstoken can be call
 *redirect url path to wait-disable when wallet is closed

* fix redirect path to error when wallet is disable

*  move accesstoken from wallet into API

* modify handler value

* add function walletRedirectHandler for latencyHandler

6 years agoremove error check of GetBlockByHash in SaveBlock (#485)
Yongfeng LI [Mon, 26 Mar 2018 07:58:09 +0000 (15:58 +0800)]
remove error check of GetBlockByHash in SaveBlock (#485)

6 years agofix build failure (#484)
Yongfeng LI [Mon, 26 Mar 2018 07:45:55 +0000 (15:45 +0800)]
fix build failure (#484)

6 years agoimprove some code (#482)
Yongfeng LI [Mon, 26 Mar 2018 07:15:14 +0000 (15:15 +0800)]
improve some code (#482)

6 years agoBlock min time (#481)
Paladz [Mon, 26 Mar 2018 07:07:54 +0000 (15:07 +0800)]
Block min time (#481)

* tmp save

* tmp save

* add block timestamp range check

* fix for test

6 years agotrim alias space before creating account, key and asset (#480)
Yongfeng LI [Mon, 26 Mar 2018 02:27:59 +0000 (10:27 +0800)]
trim alias space before creating account, key and asset (#480)

* trim alias space before creating account, key and asset

* trim alias white space when creating account, asset and key

6 years agoextract api from blockchain (#478)
Yongfeng LI [Sat, 24 Mar 2018 08:19:44 +0000 (16:19 +0800)]
extract api from blockchain (#478)

6 years agomake some fields of BlockchainReactor public to facilitate separate API (#477)
Yongfeng LI [Sat, 24 Mar 2018 07:21:48 +0000 (15:21 +0800)]
make some fields of BlockchainReactor public to facilitate separate API (#477)

* move maxBytesHandler to api.go

* move Response to api.go

* call chain from api directly

* not call BlockchainReactor inner methods from API

* make BlockchainReactor txFeedTracker public

6 years agomodify the folder struct (#476)
Paladz [Sat, 24 Mar 2018 06:37:48 +0000 (14:37 +0800)]
modify the folder struct (#476)

6 years agoRevert "remove rpc package (#474)" (#475)
Yongfeng LI [Sat, 24 Mar 2018 03:05:12 +0000 (11:05 +0800)]
Revert "remove rpc package (#474)" (#475)

This reverts commit c0563a5d0953c00d86885c4d11d0ca7fdb19c090.

6 years agoremove rpc package (#474)
Yongfeng LI [Sat, 24 Mar 2018 02:55:08 +0000 (10:55 +0800)]
remove rpc package (#474)

6 years agomove several packages out of blockchain (#473)
Yongfeng LI [Sat, 24 Mar 2018 02:38:36 +0000 (10:38 +0800)]
move several packages out of blockchain (#473)

* move account package out of blockchain

* move asset package out of blockchain

* move accesstoken out of blockchain

* move wallet package out of blockchain

6 years agoRefactor api (#472)
Yongfeng LI [Sat, 24 Mar 2018 02:22:14 +0000 (10:22 +0800)]
Refactor api (#472)

* move listAccounts to API

* add chain to API

* call walllet from API directly

* move NewSuccessResponse and NewErrorResponse to api.go

6 years agoinit push for static mining address (#471)
Paladz [Sat, 24 Mar 2018 02:06:15 +0000 (10:06 +0800)]
init push for static mining address (#471)

* init push for static mining address

* fix for code review

6 years agolist-addresses add filter by accountID pr accountAlias (#469)
oysheng [Fri, 23 Mar 2018 09:33:27 +0000 (17:33 +0800)]
list-addresses add filter by accountID pr accountAlias (#469)

* list-addresses add filter by accountID pr accountAlias

* optimse

6 years agomove request handle methods to API struct (#470)
Yongfeng LI [Fri, 23 Mar 2018 08:59:18 +0000 (16:59 +0800)]
move request handle methods to API struct (#470)

* move account related request handle methods to API

* move asset related request methods to API

* move hsm related request methods to API

* move other request methods to API

6 years agoadd API struct (#468)
Yongfeng LI [Fri, 23 Mar 2018 07:42:26 +0000 (15:42 +0800)]
add API struct (#468)

* rename rpc_reactor to api

* create API struct

* move server to API

* move buildHandler to API

* refactor initServer

* remove BlockchainReactor Handler

6 years agomodify bytomcli interface submit-transaction (#466)
oysheng [Fri, 23 Mar 2018 07:11:08 +0000 (15:11 +0800)]
modify bytomcli interface submit-transaction (#466)

modify password format

6 years agoedit reset passowrd api (#467)
Paladz [Fri, 23 Mar 2018 06:56:53 +0000 (14:56 +0800)]
edit reset passowrd api (#467)

6 years agorefactor list-unspent-outputs (#465)
Yongfeng LI [Thu, 22 Mar 2018 10:03:45 +0000 (18:03 +0800)]
refactor list-unspent-outputs (#465)

6 years agoadd timerange to txbuilder (#461)
Paladz [Thu, 22 Mar 2018 09:19:22 +0000 (17:19 +0800)]
add timerange to txbuilder (#461)

* add timerange to txbuilder

* timerange support block height

* add notes to timeRangeGash

6 years agorefactor handler related tests (#464)
Yongfeng LI [Thu, 22 Mar 2018 08:33:49 +0000 (16:33 +0800)]
refactor handler related tests (#464)

* refactor handler related tests

* fix imports

6 years agoremove serveHTTP and mux from BlockchainReactor (#463)
Yongfeng LI [Thu, 22 Mar 2018 07:57:06 +0000 (15:57 +0800)]
remove serveHTTP and mux from BlockchainReactor (#463)

* remove serveHTTP of BlockchainReactor

* remove mux from BlockchainReactor

6 years agolist-addresses response add account_alias (#462)
oysheng [Thu, 22 Mar 2018 07:50:38 +0000 (15:50 +0800)]
list-addresses response add account_alias (#462)

* git# This is a combination of 18 commits.
fix json name for submit transaction

remove useless code in blockchain/reactor.go (#441)

add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

init push for add newBlockCh for p2p (#443)

init push for validate-address API (#444)

init push for list address (#445)

fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

put hsm from BlockchainReactor to Wallet (#451)

put token management from BlockchainReactor to Wallet (#452)

init push for submit-tx (#450)

modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

bytomcli add validate-address and list-addresses

edit the create-address api (#453)

* edit the create-address api

* update dashboard

add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* add reset-key-password

* list-addresses response add account_alias
modify bytomcli create-account-receiver

6 years ago refactor node server (#460)
Yongfeng LI [Thu, 22 Mar 2018 07:12:22 +0000 (15:12 +0800)]
 refactor node server (#460)

* remove NewNodeDefault

* refactor node start server

6 years agomodify reset-key-password api (#459)
oysheng [Thu, 22 Mar 2018 07:04:37 +0000 (15:04 +0800)]
modify reset-key-password api (#459)

* git# This is a combination of 18 commits.
fix json name for submit transaction

remove useless code in blockchain/reactor.go (#441)

add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

init push for add newBlockCh for p2p (#443)

init push for validate-address API (#444)

init push for list address (#445)

fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

put hsm from BlockchainReactor to Wallet (#451)

put token management from BlockchainReactor to Wallet (#452)

init push for submit-tx (#450)

modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

bytomcli add validate-address and list-addresses

edit the create-address api (#453)

* edit the create-address api

* update dashboard

add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* add reset-key-password

6 years agomake test build failed (#457)
WangYifu [Thu, 22 Mar 2018 05:43:45 +0000 (13:43 +0800)]
make test build failed (#457)

6 years agobugfix: disable wallet panic (#456)
WangYifu [Thu, 22 Mar 2018 05:41:14 +0000 (13:41 +0800)]
bugfix: disable wallet panic (#456)

6 years ago bytomcli add validate-address and list-addresses (#455)
oysheng [Thu, 22 Mar 2018 02:58:38 +0000 (10:58 +0800)]
 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

6 years agoadd GetAccountBalances to wallet (#454)
Yongfeng LI [Wed, 21 Mar 2018 14:11:14 +0000 (22:11 +0800)]
add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

6 years agoedit the create-address api (#453)
Paladz [Wed, 21 Mar 2018 14:06:29 +0000 (22:06 +0800)]
edit the create-address api (#453)

* edit the create-address api

* update dashboard

6 years agomodify get-transaction block_time types (#449)
oysheng [Wed, 21 Mar 2018 09:50:15 +0000 (17:50 +0800)]
modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

6 years agoinit push for submit-tx (#450)
Paladz [Wed, 21 Mar 2018 09:34:31 +0000 (17:34 +0800)]
init push for submit-tx (#450)

6 years agoput token management from BlockchainReactor to Wallet (#452)
Yongfeng LI [Wed, 21 Mar 2018 08:41:47 +0000 (16:41 +0800)]
put token management from BlockchainReactor to Wallet (#452)

6 years agoput hsm from BlockchainReactor to Wallet (#451)
Yongfeng LI [Wed, 21 Mar 2018 08:21:20 +0000 (16:21 +0800)]
put hsm from BlockchainReactor to Wallet (#451)

6 years agoremove accounts and assets from BlockchainReactor (#448)
Yongfeng LI [Wed, 21 Mar 2018 07:17:01 +0000 (15:17 +0800)]
remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor