mirror of
https://github.com/kvazar-network/keva-stratum.git
synced 2025-03-13 06:21:28 +00:00
Reduce allocations in ConvertBlob
This commit is contained in:
parent
8ea446f333
commit
0805a68c41
@ -11,8 +11,7 @@ func ConvertBlob(blob []byte) []byte {
|
||||
output := make([]byte, 76)
|
||||
out := (*C.char)(unsafe.Pointer(&output[0]))
|
||||
|
||||
input := C.CString(string(blob))
|
||||
defer C.free(unsafe.Pointer(input))
|
||||
input := (*C.char)(unsafe.Pointer(&blob[0]))
|
||||
|
||||
size := (C.uint32_t)(len(blob))
|
||||
C.convert_blob(input, size, out)
|
||||
|
Loading…
x
Reference in New Issue
Block a user