OSDN Git Service

feat: add cross-chain output (#56)
authorHAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Tue, 14 May 2019 14:48:30 +0000 (22:48 +0800)
committerPaladz <yzhu101@uottawa.ca>
Tue, 14 May 2019 14:48:30 +0000 (22:48 +0800)
commita8fcbab90cbbfcc0acea0a4bd1389e39ece3da56
treed5315693b3a21290edee8b366fa86369dbeea256
parent2ffd5b239ec0ed7c96f789362d8b986834ae227f
feat: add cross-chain output (#56)

* refactor: move ComputeOutputID() for SpendCommitment

* wip: init OutputType

* refactor: rename NewTxOutput to NewIntraChainTxOutput

* wip: typed intra-chain output

* feat: add CrossChainTxOutput

* fix: fix CrossChainOutputType

* doc: update todo

* init bc

* fix

* wip: bc NewIntraChainOutput

* fix: bc IntraChainOutput

* fix: fix tx.Output()

* move ComputeOutputID back

* fix types.NewIntraChainTxOutput & types.NewCrossChainTxOutput

* doc: update todo

* fix: add VMVersion, ControlProgram and AssetAmount for types.Output

* fix map.go

* fix txfeed

* fix peer.go

* fi

* rename

* fix TxOutput.readFrom()

* fix TxOutput.readFrom()

* use currentAssetVersion

* clean

* update todos

* add cross-chain in mapTx.go

* doc: update comments

* wip: check IntraChainOutput source in validation

* wip: checkValidDest() checks CrossChainOutput

* fix checkStandardTx

* fix: fix checkStandardTx

* fix: fix TxOutput.writeTo()

* fix hard-coded AssetVersion

* roll back assetVersion

* refactor: rename ComputeOutputID

* refactor: rename ComputeOutputID()

* fix blockchain/txbuilder/txbuilder_test.go

* fix: fix crosschainOut as Input

* doc: fix comments

* wip

* clean

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* clean

* fix

* fix

* fix

* fix

* fix

* fix wip

* should fix

* figure out

* fix comment

* fix estimate gas

* fixing

* try merkle

* fix merkle test

* fix merkle comp

* fix TestTxOutToUtxos()

* fix TestReadFrom

* minor

* try fix the ci
60 files changed:
account/builder.go
account/builder_test.go
api/block_retrieve.go
api/query.go
blockchain/txbuilder/actions.go
blockchain/txbuilder/builder.go
blockchain/txbuilder/estimate_test.go
blockchain/txbuilder/finalize.go
blockchain/txbuilder/signature_program.go
blockchain/txbuilder/txbuilder.go
blockchain/txbuilder/txbuilder_test.go
blockchain/txfeed/txfeed.go
config/genesis.go
mining/mining.go
mining/mining_test.go
netsync/block_keeper_test.go
netsync/peer.go
netsync/tool_test.go
protocol/bc/bc.pb.go
protocol/bc/bc.proto
protocol/bc/crosschain_output.go [new file with mode: 0644]
protocol/bc/entry_test.go
protocol/bc/intrachain_output.go [new file with mode: 0644]
protocol/bc/output.go [deleted file]
protocol/bc/tx.go
protocol/bc/types/block_test.go
protocol/bc/types/crosschain_txoutput.go [new file with mode: 0644]
protocol/bc/types/intrachain_txoutput.go [new file with mode: 0644]
protocol/bc/types/map.go
protocol/bc/types/map_test.go
protocol/bc/types/merkle_test.go
protocol/bc/types/transaction_test.go
protocol/bc/types/txinput.go
protocol/bc/types/txoutput.go
protocol/bc/types/txoutput_test.go
protocol/state/utxo_view.go
protocol/state/utxo_view_test.go
protocol/txpool.go
protocol/txpool_test.go
protocol/validation/block.go
protocol/validation/block_test.go
protocol/validation/test/tx_ugly_test.go
protocol/validation/tx.go
protocol/validation/tx_scene_test.go
protocol/validation/tx_test.go
protocol/validation/vmcontext.go
protocol/validation/vmcontext_test.go
test/bench_blockchain_test.go
test/chain_test_util.go
test/tx_test_util.go
test/util.go
test/utxo_view/utxo_view_test_util.go
wallet/annotated.go
wallet/indexer.go
wallet/recovery.go
wallet/recovery_test.go
wallet/unconfirmed.go
wallet/utxo.go
wallet/utxo_test.go
wallet/wallet_test.go