From b40f5a1b240a9696f9be63dbf182775cceb49a44 Mon Sep 17 00:00:00 2001 From: David Hill Date: Fri, 30 May 2014 15:03:39 -0400 Subject: [PATCH] add missing Lock to FetchTxBySha --- ldb/tx.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ldb/tx.go b/ldb/tx.go index 9ff7b603..7e4fad81 100644 --- a/ldb/tx.go +++ b/ldb/tx.go @@ -369,6 +369,9 @@ func (db *LevelDb) fetchTxDataByLoc(blkHeight int64, txOff int, txLen int, txspe // FetchTxBySha returns some data for the given Tx Sha. func (db *LevelDb) FetchTxBySha(txsha *btcwire.ShaHash) ([]*btcdb.TxListReply, error) { + db.dbLock.Lock() + defer db.dbLock.Unlock() + replylen := 0 replycnt := 0