diff options
| author | Bitflash <btf01@proton.me> | 2026-07-28 15:25:29 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-28 15:25:29 -0300 |
| commit | 8770e49d5264bdc9f6daec61dee74ca74dabdc0a (patch) | |
| tree | 7899739b6619ee355cedda188b58baf9aacdb6c4 /src/script.cpp | |
| parent | 1635bc34f40c76ac2943dbe6ff15dd0180b62ea6 (diff) | |
main: cap orphan transactions held in memory (#16)
A transaction naming a parent the node does not have is never validated,
just stored in mapOrphanTransactions -- and there was no ceiling. Sending
them costs a peer nothing: no proof of work, no valid signature, no fee,
and the node keeps every one. Any peer could grow that map until the node
died of memory exhaustion.
Cap at 100, evicting at random rather than in map order so an attacker
cannot keep its own orphans resident by choosing hashes that sort low.
Local policy, not consensus -- no effect on block or transaction
validity.
Diffstat (limited to 'src/script.cpp')
0 files changed, 0 insertions, 0 deletions