All external entry points into the database must be locked.
This commit is contained in:
parent
1b51d58e55
commit
4d63076526
1 changed files with 3 additions and 0 deletions
|
@ -251,6 +251,9 @@ func (db *LevelDb) existsTxSha(txSha *btcwire.ShaHash) (exists bool) {
|
||||||
|
|
||||||
// FetchTxByShaList returns the most recent tx of the name fully spent or not
|
// FetchTxByShaList returns the most recent tx of the name fully spent or not
|
||||||
func (db *LevelDb) FetchTxByShaList(txShaList []*btcwire.ShaHash) []*btcdb.TxListReply {
|
func (db *LevelDb) FetchTxByShaList(txShaList []*btcwire.ShaHash) []*btcdb.TxListReply {
|
||||||
|
db.dbLock.Lock()
|
||||||
|
defer db.dbLock.Unlock()
|
||||||
|
|
||||||
// until the fully spent separation of tx is complete this is identical
|
// until the fully spent separation of tx is complete this is identical
|
||||||
// to FetchUnSpentTxByShaList
|
// to FetchUnSpentTxByShaList
|
||||||
replies := make([]*btcdb.TxListReply, len(txShaList))
|
replies := make([]*btcdb.TxListReply, len(txShaList))
|
||||||
|
|
Loading…
Reference in a new issue