Repository navigation
Commit f31829e
committed
Punish nodes relatively for oversize blocks
In the case we receive a block that is over our size limit we don't
immediately disconnect. Instead we punish the node based on the amount
of bytes that it was over our limit. (100 points is immediate
disconnect)
This avoids us receiving a block 1 byte over the limit and immediately
banning that node for 24 hours. Instead only ban nodes that have
substantially different ideas about block sizes than we do.1 parent dd52ec0 commit f31829e
2 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3091 | 3091 | | |
3092 | 3092 | | |
3093 | 3093 | | |
3094 | | - | |
3095 | | - | |
3096 | | - | |
3097 | | - | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
3098 | 3102 | | |
3099 | 3103 | | |
3100 | 3104 | | |
| |||
0 commit comments