mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Update encoding_test.go
This commit is contained in:
parent
2e5cd21edf
commit
4b1df3145b
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ func TestHexToCompactInPlaceRandom(t *testing.T) {
|
||||||
key := make([]byte, l)
|
key := make([]byte, l)
|
||||||
crand.Read(key)
|
crand.Read(key)
|
||||||
hexBytes := keybytesToHex(key)
|
hexBytes := keybytesToHex(key)
|
||||||
hexOrig := []byte(string(hexBytes))
|
hexOrig := append([]byte(nil), hexBytes...) // copy without extra string alloc
|
||||||
exp := hexToCompact(hexBytes)
|
exp := hexToCompact(hexBytes)
|
||||||
got := hexToCompactInPlace(hexBytes)
|
got := hexToCompactInPlace(hexBytes)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue