Skip to content

Commit

Permalink
store proper txid
Browse files Browse the repository at this point in the history
  • Loading branch information
bitspill committed Dec 1, 2018
1 parent b6215cf commit 4ea7a86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datastore/bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (bi *BulkIndexer) StoreTransaction(td *TransactionData) {
bir := elastic.NewBulkIndexRequest().
Index(Index("transactions")).
Type("_doc").
Id(td.Transaction.Hash).
Id(td.Transaction.Txid).
Doc(td)
bi.Add(bir)
}
Expand Down
2 changes: 1 addition & 1 deletion datastore/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func StoreTransaction(ctx context.Context, t *TransactionData) (*elastic.IndexRe
put1, err := client.Index().
Index("transaction").
Type("_doc").
Id(t.Transaction.Hash).
Id(t.Transaction.Txid).
BodyJson(t).
Do(ctx)
if err != nil {
Expand Down

0 comments on commit 4ea7a86

Please sign in to comment.