0.17においてはコンパイルエラーは修正されていますのでパッチは必要ないです。
gcc7、boostのバージョン、コンパイルエラーがあって罠だらけなのでメモっておきます
yum install "@Development Tools" centos-release-scl epel-release
yum install python-devel openssl-devel libevent-devel libdb-cxx libdb-cxx-devel zlib zlib-devel bzip2-libs bzip2-devel lz4 lz4-devel cmake make devtoolset-7
curl https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 > /tmp/boost_1_66_0.tar.bz2
tar jxvf /tmp/boost_1_66_0.tar.bz2
cd /tmp/boost_1_66_0
scl enable devtoolset-7 "./bootstrap.sh"
scl enable devtoolset-7 "./b2 -j 2 install --prefix=/usr/local"
boostがstatic buildではない場合はldconfig必須
ソースコードのパッチを当てる
src/miner.h
--- ../src/miner.h 2017-12-30 18:31:55.000000000 +0000
+++ ./miner.h 2018-03-09 09:29:44.084040666 +0000
@@ -71,7 +71,7 @@
// TODO: refactor to avoid duplication of this logic.
struct CompareModifiedEntry {
bool operator()(const CTxMemPoolModifiedEntry &a,
- const CTxMemPoolModifiedEntry &b) {
+ const CTxMemPoolModifiedEntry &b) const {
double f1 = double(b.nSizeWithAncestors *
a.nModFeesWithAncestors.GetSatoshis());
double f2 = double(a.nSizeWithAncestors *
src/txmempool.h
--- ../src/txmempool.h 2017-12-30 18:31:55.000000000 +0000
+++ ./txmempool.h 2018-03-09 09:29:49.255970379 +0000
@@ -245,7 +245,7 @@
*/
class CompareTxMemPoolEntryByDescendantScore {
public:
- bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) {
+ bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) const {
bool fUseADescendants = UseDescendantScore(a);
bool fUseBDescendants = UseDescendantScore(b);
@@ -272,7 +272,7 @@
}
// Calculate which score to use for an entry (avoiding division).
- bool UseDescendantScore(const CTxMemPoolEntry &a) {
+ bool UseDescendantScore(const CTxMemPoolEntry &a) const {
double f1 = double(a.GetSizeWithDescendants() *
a.GetModifiedFee().GetSatoshis());
double f2 =
@@ -287,7 +287,7 @@
*/
class CompareTxMemPoolEntryByScore {
public:
- bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) {
+ bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) const {
double f1 = double(b.GetTxSize() * a.GetModifiedFee().GetSatoshis());
double f2 = double(a.GetTxSize() * b.GetModifiedFee().GetSatoshis());
if (f1 == f2) {
@@ -299,14 +299,14 @@
class CompareTxMemPoolEntryByEntryTime {
public:
- bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) {
+ bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) const {
return a.GetTime() < b.GetTime();
}
};
class CompareTxMemPoolEntryByAncestorFee {
public:
- bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) {
+ bool operator()(const CTxMemPoolEntry &a, const CTxMemPoolEntry &b) const {
double aFees = double(a.GetModFeesWithAncestors().GetSatoshis());
double aSize = a.GetSizeWithAncestors();
issueには上がっているが直す気がないみたいなので。
プルリクはおくらずここにメモっておく。
https://github.com/Bitcoin-ABC/bitcoin-abc/issues/173
scl enable devtoolset-7 "./autogen.sh"
scl enable devtoolset-7 "./configure --disable-wallet --program-transform-name=s/bitcoin/bitcoincash/g"
scl enable devtoolset-7 "make -j 2"
scl enable devtoolset-7 "make install"