Commit 5029698
prevent peer flooding request queue for an inv
mapAlreadyAskedFor does not keep track of which peer has a request queued for a
particular tx. As a result, a peer can blind a node to a tx indefinitely by
sending many invs for the same tx, and then never replying to getdatas for it.
Each inv received will be placed 2 minutes farther back in mapAlreadyAskedFor,
so a short message containing 10 invs would render that tx unavailable for 20
minutes.
This is fixed by disallowing a peer from having more than one entry for a
particular inv in mapAlreadyAskedFor at a time.1 parent 0b0fc17 commit 5029698
3 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5226 | 5226 | | |
5227 | 5227 | | |
5228 | 5228 | | |
| 5229 | + | |
5229 | 5230 | | |
5230 | 5231 | | |
5231 | 5232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2410 | 2410 | | |
2411 | 2411 | | |
2412 | 2412 | | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
2413 | 2417 | | |
2414 | 2418 | | |
2415 | 2419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| |||
0 commit comments