Stratum up (#4233)
* flush work * flush work * flush work * flush work * generalized notifiers * general setup with modules * general setup with modules * all binded * catch up with master * all dependencies injected * stratum another up * tcp update * submitwork routine * finalize & fix warnings * merge bugs, review fixes * merge bugs, review fixes * new cli mess cleanup * usage.txt swap * flush work * cli adopt * compilation with new cli sorted * subid space in json * serialization issues * grumbles addressed * more grumbles * remove last_work note for now * fix compilation * fix tests * merge bugs * no obliged ipc * moving notifiers * no optional feature now * refactored again * working on tests * refactor to new tcp/ip * stratum lib ok * ethcore crate ok * wip on tests * final test working * fix warnings, \n-terminated response * new compatibility * re-pushing work once anybody submitted * various review and general fixes * reviewe fixes * remove redundant notifier * one symbol -> huge bug * ensure write lock isn't held when calling handlers * extern declarations moved * options to stratum mod, SocketAddr strongly-typed instantiation * Minor style fix. * Whitespace and phrasing * Whitespace
This commit is contained in:
@@ -233,6 +233,15 @@ usage! {
|
||||
flag_refuse_service_transactions: bool = false,
|
||||
or |c: &Config| otry!(c.mining).refuse_service_transactions.clone(),
|
||||
|
||||
flag_stratum: bool = false,
|
||||
or |c: &Config| Some(c.stratum.is_some()),
|
||||
flag_stratum_interface: String = "local",
|
||||
or |c: &Config| otry!(c.stratum).interface.clone(),
|
||||
flag_stratum_port: u16 = 8008u16,
|
||||
or |c: &Config| otry!(c.stratum).port.clone(),
|
||||
flag_stratum_secret: Option<String> = None,
|
||||
or |c: &Config| otry!(c.stratum).secret.clone().map(Some),
|
||||
|
||||
// -- Footprint Options
|
||||
flag_tracing: String = "auto",
|
||||
or |c: &Config| otry!(c.footprint).tracing.clone(),
|
||||
@@ -313,6 +322,7 @@ struct Config {
|
||||
snapshots: Option<Snapshots>,
|
||||
vm: Option<VM>,
|
||||
misc: Option<Misc>,
|
||||
stratum: Option<Stratum>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
@@ -421,6 +431,13 @@ struct Mining {
|
||||
refuse_service_transactions: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
struct Stratum {
|
||||
interface: Option<String>,
|
||||
port: Option<u16>,
|
||||
secret: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
struct Footprint {
|
||||
tracing: Option<String>,
|
||||
@@ -638,6 +655,11 @@ mod tests {
|
||||
flag_notify_work: Some("http://localhost:3001".into()),
|
||||
flag_refuse_service_transactions: false,
|
||||
|
||||
flag_stratum: false,
|
||||
flag_stratum_interface: "local".to_owned(),
|
||||
flag_stratum_port: 8008u16,
|
||||
flag_stratum_secret: None,
|
||||
|
||||
// -- Footprint Options
|
||||
flag_tracing: "auto".into(),
|
||||
flag_pruning: "auto".into(),
|
||||
@@ -843,7 +865,8 @@ mod tests {
|
||||
logging: Some("own_tx=trace".into()),
|
||||
log_file: Some("/var/log/parity.log".into()),
|
||||
color: Some(true),
|
||||
})
|
||||
}),
|
||||
stratum: None,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +260,11 @@ Sealing/Mining Options:
|
||||
(default: {flag_notify_work:?})
|
||||
--refuse-service-transactions Always refuse service transactions.
|
||||
(default: {flag_refuse_service_transactions}).
|
||||
--stratum Run Stratum server for miner push notification. (default: {flag_stratum})
|
||||
--stratum-interface IP Interface address for Stratum server. (default: {flag_stratum_interface})
|
||||
--stratum-port PORT Port for Stratum server to listen on. (default: {flag_stratum_port})
|
||||
--stratum-secret STRING Secret for authorizing Stratum server for peers.
|
||||
(default: {flag_stratum_secret:?})
|
||||
|
||||
Footprint Options:
|
||||
--tracing BOOL Indicates if full transaction tracing should be
|
||||
|
||||
Reference in New Issue
Block a user