1 2 3 4 5 6 7 8 9 10 11 12
use std::net::IpAddr; //@todo review this. I'm not sure if this is the best strategy here, but I'd like for the ability //to pass some information to the implementer of traits. I.E. For logging in, the implementer //probably wants the IP of the connection that is attempting to log in, so that they can rate limit //or ban. Further, for share submitting and other features, the implementer probably wants the same //ability. Rather than pass the entire stream into the trait functions, I figured we should build a //struct that holds some information about the miner that can be edited and passed into those //functions. pub struct MinerInfo { pub ip: IpAddr, }