les: fixed transaction sending deadlock

This commit is contained in:
Zsolt Felfoldi 2017-01-15 18:10:05 +01:00
parent b5a100b859
commit e85684e31f

View file

@ -110,7 +110,6 @@ func (self *LesTxRelay) send(txs types.Transactions, count int) {
for p, list := range sendTo { for p, list := range sendTo {
cost := p.GetRequestCost(SendTxMsg, len(list)) cost := p.GetRequestCost(SendTxMsg, len(list))
go func(p *peer, list types.Transactions, cost uint64) { go func(p *peer, list types.Transactions, cost uint64) {
p.fcServer.SendRequest(0, cost)
p.SendTxs(cost, list) p.SendTxs(cost, list)
}(p, list, cost) }(p, list, cost)
} }