add missing Lock to FetchTxBySha
This commit is contained in:
parent
75e199ece8
commit
b40f5a1b24
1 changed files with 3 additions and 0 deletions
|
@ -369,6 +369,9 @@ func (db *LevelDb) fetchTxDataByLoc(blkHeight int64, txOff int, txLen int, txspe
|
||||||
|
|
||||||
// FetchTxBySha returns some data for the given Tx Sha.
|
// FetchTxBySha returns some data for the given Tx Sha.
|
||||||
func (db *LevelDb) FetchTxBySha(txsha *btcwire.ShaHash) ([]*btcdb.TxListReply, error) {
|
func (db *LevelDb) FetchTxBySha(txsha *btcwire.ShaHash) ([]*btcdb.TxListReply, error) {
|
||||||
|
db.dbLock.Lock()
|
||||||
|
defer db.dbLock.Unlock()
|
||||||
|
|
||||||
replylen := 0
|
replylen := 0
|
||||||
replycnt := 0
|
replycnt := 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue