Commit Graph

7 Commits

Author SHA1 Message Date
ledgerwatch
535ce8fb9c
Try to solve sentry hanging problem + p2p impovement from geth (#2191)
* Try to solve sentry hanging problem + p2p impovement from geth

* Fix import

* Finer stream lock

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-06-18 12:47:46 +01:00
Martin Holst Swende
288f9bd414 core/types, rlp: optimize derivesha (#21728)
This PR contains a minor optimization in derivesha, by exposing the RLP
int-encoding and making use of it to write integers directly to a
buffer (an RLP integer is known to never require more than 9 bytes
total). rlp.AppendUint64 might be useful in other places too.

The code assumes, just as before, that the hasher (a trie) will copy the
key internally, which it does when doing keybytesToHex(key).

Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
#	core/types/derive_sha.go
2020-12-03 18:59:17 +01:00
Igor Mandrigin
70f6ec3b49 post-rebase fixes 2020-10-06 14:12:09 +02:00
Felix Lange
79f7f2853f rlp: add SplitUint64 (#21563)
This can be useful when working with raw RLP data.
2020-10-06 14:12:09 +02:00
Felix Lange
2499b1b139
rlp: fix string size check in readKind (#15625)
Issue found by @guidovranken
2017-12-11 22:47:10 +01:00
Felix Lange
6fdd0893c3 all: fix go vet warnings 2016-04-15 11:17:27 +02:00
Felix Lange
bc17dba8fb rlp: add Split functions
These functions allow destructuring of raw rlp-encoded bytes
without the overhead of reflection or copying.
2015-09-10 19:41:51 +02:00