MCPcopy Create free account
hub / github.com/MetaMask/torus-node / castOrUnmarshal

Function castOrUnmarshal

dkgnode/utils.go:160–187  ·  view source on GitHub ↗

castOrUnmarshal allows us to pass in any interface and it will either cast dataInter to v or unmarshal bytes to v it does so by detecting if dataInter is of a custom bytes type accepts a silent flag, which skips all logging and debugging (may be expensive)

(dataInter interface{}, v interface{}, flags ...bool)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 15

CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
CallMethod · 0.85
GetCurrentEpochMethod · 0.85
GetPreviousEpochMethod · 0.85
GetNextEpochMethod · 0.85

Calls 2

DebugMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected