Skip to content

Instantly share code, notes, and snippets.

@Holger-Will
Created February 27, 2018 08:47
Show Gist options
  • Save Holger-Will/89d91844c31a8b66e94183dc87a7cd5e to your computer and use it in GitHub Desktop.
Save Holger-Will/89d91844c31a8b66e94183dc87a7cd5e to your computer and use it in GitHub Desktop.
diff --git a/nheqminer/libstratum/ZcashStratum.cpp b/nheqminer/libstratum/ZcashStratum.cpp
index 7eac7199..6cc047bf 100644
--- a/nheqminer/libstratum/ZcashStratum.cpp
+++ b/nheqminer/libstratum/ZcashStratum.cpp
@@ -490,7 +490,7 @@ ZcashJob* ZcashMiner::parseJob(const Array& params)
// TODO: On a LE host shouldn't this be le32toh?
ret->header.nVersion = be32toh(version);
- if (ret->header.nVersion == 4) {
+ if (ret->header.nVersion > 29) { //BIP 9
if (params.size() < 8) {
throw std::logic_error("Invalid job params");
}
diff --git a/nheqminer/libstratum/ZcashStratum.cpp b/nheqminer/libstratum/ZcashStratum.cpp
index 6cc047bf..12f08e49 100644
--- a/nheqminer/libstratum/ZcashStratum.cpp
+++ b/nheqminer/libstratum/ZcashStratum.cpp
@@ -490,7 +490,7 @@ ZcashJob* ZcashMiner::parseJob(const Array& params)
// TODO: On a LE host shouldn't this be le32toh?
ret->header.nVersion = be32toh(version);
- if (ret->header.nVersion > 29) { //BIP 9
+ // if (ret->header.nVersion > 29) { //BIP 9
if (params.size() < 8) {
throw std::logic_error("Invalid job params");
}
@@ -516,9 +516,9 @@ ZcashJob* ZcashMiner::parseJob(const Array& params)
ret->time = params[5].get_str();
ret->clean = params[7].get_bool();
- } else {
+ /* } else {
throw std::logic_error("ZcashMiner::parseJob(): Invalid or unsupported block header version");
- }
+ } */
ret->header.nNonce = nonce1;
ret->nonce1Size = nonce1Size;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment