Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RXVerifier ¶
type RXVerifier struct {
// contains filtered or unexported fields
}
func NewRXVerifier ¶
func NewRXVerifier(server string) *RXVerifier
NewRXVerifier returns a RXVerifier instance, which is used to wrap a connection to the RandomX verificaton daemon. It expects a server argument, which should be the HTTP interface including the port, but this is optional if the daemon is running on the default port/localhost bindings
func (*RXVerifier) Hash ¶
func (s *RXVerifier) Hash(input []byte, seed []byte) ([]byte, error)
Hash performs an actual round of hashing against a given input, for RandomX, this sends it off to the verifier
func (*RXVerifier) Info ¶
func (s *RXVerifier) Info() (*ValidatorInfo, error)
Info returns the information available from the /info endpoint in the daemon
func (*RXVerifier) NewSeed ¶
func (s *RXVerifier) NewSeed(input []byte) error
NewSeed sets the seed value into the remote daemon and updates the local seed directly.
func (*RXVerifier) SetCurrentSeed ¶
func (s *RXVerifier) SetCurrentSeed(input []byte)
SetCurrentSeed is used to overwrite the current seed in an RXVerifier setup, this is largely for multithreaded implementations where multiple clients need to synchronize their seed across instances together