mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-05 14:38:42 +00:00
change requestByCustody to use bitmap as key
This commit is contained in:
parent
c4ea820d27
commit
07d3ae1d80
1 changed files with 3 additions and 6 deletions
|
|
@ -701,17 +701,14 @@ func (f *BlobFetcher) scheduleFetches(timer *mclock.Timer, timeout chan struct{}
|
||||||
// If any hashes were allocated, request them from the peer
|
// If any hashes were allocated, request them from the peer
|
||||||
if len(hashes) > 0 {
|
if len(hashes) > 0 {
|
||||||
// Group hashes by custody bitmap
|
// Group hashes by custody bitmap
|
||||||
requestByCustody := make(map[string]*cellRequest)
|
requestByCustody := make(map[types.CustodyBitmap]*cellRequest)
|
||||||
|
|
||||||
for i, hash := range hashes {
|
for i, hash := range hashes {
|
||||||
custody := custodies[i]
|
key := *custodies[i]
|
||||||
|
|
||||||
key := string(custody[:])
|
|
||||||
|
|
||||||
if _, ok := requestByCustody[key]; !ok {
|
if _, ok := requestByCustody[key]; !ok {
|
||||||
requestByCustody[key] = &cellRequest{
|
requestByCustody[key] = &cellRequest{
|
||||||
txs: []common.Hash{},
|
txs: []common.Hash{},
|
||||||
cells: custody,
|
cells: custodies[i],
|
||||||
time: f.clock.Now(),
|
time: f.clock.Now(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue