Skip to content

Conversation

@PeterL73
Copy link

Issue being fixed #2811

Build fails with configure flag "--enable-mining-rpc"
When attempting to build using the "--enable-mining-rpc" flag, the build fails.

What was done

  • add include warnings.h
  • change uint256 to arith_uint256

Before

Build fails

  CXX      rpc/libbitcoin_server_a-mining.o
rpc/mining.cpp: In function 'UniValue GetNetworkHashPS(int, int)':
rpc/mining.cpp:238:39: error: conversion from 'const base_uint<256>' to non-scalar type 'uint256' requested
     uint256 workDiff = pb->nChainWork - pb0->nChainWork;
                        ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
rpc/mining.cpp:241:31: error: 'class uint256' has no member named 'getdouble'
     return (int64_t)(workDiff.getdouble() / timeDiff);
                               ^~~~~~~~~
rpc/mining.cpp: In function 'UniValue getmininginfo(const JSONRPCRequest&)':
rpc/mining.cpp:395:26: error: 'GetWarnings' was not declared in this scope
     obj.pushKV("errors", GetWarnings("statusbar"));
                          ^~~~~~~~~~~
rpc/mining.cpp:395:26: note: suggested alternative: 'GetMainSignals'
     obj.pushKV("errors", GetWarnings("statusbar"));
                          ^~~~~~~~~~~
                          GetMainSignals
Makefile:9548: recipe for target 'rpc/libbitcoin_server_a-mining.o' failed

After

Build succeeds

add include warnings.h
change uint256 to arith_uint256
@Fuzzbawls Fuzzbawls changed the title Fix build with configure flag --enable-mining-rpc [Build] Fix build with configure flag --enable-mining-rpc Mar 4, 2023
@Fuzzbawls Fuzzbawls added this to the 6.0.0 milestone Mar 4, 2023
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 83f940a

Copy link

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 83f940a:
Tested that I can successfully configure and build with --enable-mining-rpc

@Fuzzbawls Fuzzbawls merged commit c36e8c5 into PIVX-Project:master Mar 5, 2023
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.6.0 Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build fails with configure flag -enable-rpc-mining

3 participants