MCPcopy
hub / github.com/canopy-network/canopy / BytesToString

Function BytesToString

lib/util.go:537–540  ·  view source on GitHub ↗

BytesToString() converts a byte slice to a hexadecimal string

(b []byte)

Source from the content-addressed store, hash-verified

535
536// BytesToString() converts a byte slice to a hexadecimal string
537func BytesToString(b []byte) string {
538 // hex encode the bytes into a string
539 return hex.EncodeToString(b)
540}
541
542// StringToBytes() converts a hexadecimal string back into a byte slice
543func StringToBytes(s string) ([]byte, ErrorI) {

Callers 15

SyncMethod · 0.92
GossipConsensusMethod · 0.92
pollMaxHeightMethod · 0.92
IsValidDoubleSignerMethod · 0.92
GossipBlockMethod · 0.92
CommitCertificateMethod · 0.92
ApplyAndValidateBlockMethod · 0.92
HandlePeerBlockMethod · 0.92
newTestTxResultFunction · 0.92

Calls

no outgoing calls

Tested by 4

newTestTxResultFunction · 0.74
TestSelectorsFunction · 0.74
TestStartFunction · 0.74