mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
dpa storeloop PUT is async
This commit is contained in:
parent
d853c6fe3a
commit
65b7c3101e
2 changed files with 8 additions and 5 deletions
|
|
@ -154,10 +154,10 @@ func (self *DPA) storeLoop() {
|
|||
STORE:
|
||||
for ch := range self.storeC {
|
||||
go func(chunk *Chunk) {
|
||||
self.ChunkStore.Put(ch)
|
||||
if ch.wg != nil {
|
||||
self.ChunkStore.Put(chunk)
|
||||
if chunk.wg != nil {
|
||||
dpaLogger.Debugf("DPA.storeLoop %064x", chunk.Key)
|
||||
ch.wg.Done()
|
||||
chunk.wg.Done()
|
||||
}
|
||||
self.ChunkStore.Put(chunk)
|
||||
}(ch)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package eth
|
|||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/ethereum/go-ethereum/bzz"
|
||||
|
|
@ -256,8 +257,10 @@ func (s *Ethereum) Start(seed bool, p string) error {
|
|||
go s.blockBroadcastLoop()
|
||||
|
||||
if len(p) > 0 {
|
||||
if err := s.SuggestPeer(p); err != nil {
|
||||
return err
|
||||
for _, peer := range strings.Split(p, ",") {
|
||||
if err := s.SuggestPeer(peer); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue