OSDN Git Service

feat: support global tx in api.listTransactions and api.getTransaction (#1694)
authorHAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Tue, 16 Apr 2019 08:52:38 +0000 (16:52 +0800)
committerPaladz <yzhu101@uottawa.ca>
Tue, 16 Apr 2019 08:52:38 +0000 (16:52 +0800)
commiteab3a1dc51d93bc9edaa4be7c9ba54ec4035ce54
tree5a1feb0bf1b8a32644a6bea34fd9e3cb4b9b1721
parentda28b597d5b959b3257a9e90926c4283e49ad082
feat: support global tx in api.listTransactions and api.getTransaction (#1694)

* feat: add wallet.SaveGlobalTxIdxFlag

* feat: add  blockHash, position, err := parseGlobalTxIdx(string(globalTxIdx))

* feat: implement parseGlobalTxIdx

* wip

* fix: fix calcGlobalTxIndex()

* feat: support getGlobalTxByTxID() in GetTransactionByTxID()

* refactor: rename save_global_tx_index

* refactor: use encoding/binary for position in txIndex

* feat: use wallet.TxIndexFlag to control GetTransactionByTxID flow

* refactor: wrap txIndexFlag inside NewWallet()

* fix: fix wallet_test_util

* refactor: reduce globalTxIdx space by using bytes directly
cmd/bytomd/commands/run_node.go
config/config.go
node/node.go
test/wallet_test_util.go
wallet/indexer.go
wallet/unconfirmed_test.go
wallet/wallet.go
wallet/wallet_test.go