OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de01d91
)
fix query transactions error (#1703)
author
oysheng
<33340252+oysheng@users.noreply.github.com>
Wed, 17 Apr 2019 08:30:22 +0000
(16:30 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Wed, 17 Apr 2019 08:30:22 +0000
(16:30 +0800)
* fix query transactions error
* optimise
api/query.go
patch
|
blob
|
history
diff --git
a/api/query.go
b/api/query.go
index
5265475
..
330d431
100644
(file)
--- a/
api/query.go
+++ b/
api/query.go
@@
-144,9
+144,10
@@
func (a *API) listTransactions(ctx context.Context, filter struct {
transaction, err = a.wallet.GetTransactionByTxID(filter.ID)
if err != nil && filter.Unconfirmed {
transaction, err = a.wallet.GetUnconfirmedTxByTxID(filter.ID)
- if err != nil {
- return NewErrorResponse(err)
- }
+ }
+
+ if err != nil {
+ return NewErrorResponse(err)
}
transactions = []*query.AnnotatedTx{transaction}
} else {