Allow changing network upgrade parameters on regtest

Derived from upstream commit 56c87e92110f05d7452f1e85bf755246ffc77206:
    Allow changing BIP9 parameters on regtest
This commit is contained in:
Jack Grigg
2018-01-31 20:11:18 +00:00
parent 780f526bc9
commit b174b7e330
5 changed files with 61 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
#include <cstdlib>
#include <cstring>
#include <errno.h>
#include <iomanip>
#include <limits>
using namespace std;
@@ -46,6 +47,13 @@ string SanitizeFilename(const string& str)
return strResult;
}
std::string HexInt(uint32_t val)
{
std::stringstream ss;
ss << std::setfill('0') << std::setw(sizeof(uint32_t) * 2) << std::hex << val;
return ss.str();
}
const signed char p_util_hexdigit[256] =
{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,