Browse Source

Correctly link against librandomx in build

pull/151/head
Duke Leto 2 years ago
parent
commit
35f6314123
  1. 10
      src/Makefile.am
  2. 8
      src/miner.cpp

10
src/Makefile.am

@ -53,6 +53,7 @@ LIBCRYPTOCONDITIONS=cryptoconditions/libcryptoconditions_core.la
LIBUNIVALUE=univalue/libunivalue.la
LIBZCASH=libzcash.a
LIBHUSH=libhush.a
LIBRANDOMX=RandomX/build/librandomx.a
if ENABLE_ZMQ
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
@ -505,7 +506,8 @@ hushd_LDADD = \
$(LIBLEVELDB) \
$(LIBMEMENV) \
$(LIBSECP256K1) \
$(LIBCRYPTOCONDITIONS)
$(LIBCRYPTOCONDITIONS) \
$(LIBRANDOMX)
if ENABLE_WALLET
hushd_LDADD += $(LIBBITCOIN_WALLET)
@ -583,7 +585,8 @@ wallet_utility_LDADD = \
$(CRYPTO_LIBS) \
$(LIBZCASH) \
$(LIBZCASH_LIBS)\
$(LIBCRYPTOCONDITIONS)
$(LIBCRYPTOCONDITIONS) \
$(LIBRANDOMX)
endif
# hush-tx binary #
@ -605,7 +608,8 @@ hush_tx_LDADD = \
$(LIBHUSH) \
$(LIBBITCOIN_CRYPTO) \
$(LIBZCASH_LIBS) \
$(LIBCRYPTOCONDITIONS)
$(LIBCRYPTOCONDITIONS) \
$(LIBRANDOMX)
hush_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)

8
src/miner.cpp

@ -116,6 +116,7 @@ public:
};
extern int8_t ASSETCHAINS_ADAPTIVEPOW;
extern uint32_t ASSETCHAINS_RANDOMX;
void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev)
{
@ -1025,8 +1026,9 @@ void static RandomXMiner()
miningTimer.start();
try {
if ( SMART_CHAIN_SYMBOL[0] != 0 )
fprintf(stderr,"try %s Mining with %s\n",SMART_CHAIN_SYMBOL,solver.c_str());
if ( SMART_CHAIN_SYMBOL[0] != 0 ) {
fprintf(stderr,"trying %s Mining with randomx\n",SMART_CHAIN_SYMBOL);
}
while (true)
{
if (chainparams.MiningRequiresPeers()) {
@ -1109,7 +1111,7 @@ void static RandomXMiner()
}
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
//fprintf(stderr,"Running HushMiner.%s with %u transactions in block\n",solver.c_str(),(int32_t)pblock->vtx.size());
LogPrintf("Running HushRandomXMiner with %u transactions in block (%u bytes)\n",,pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION));
LogPrintf("Running HushRandomXMiner with %u transactions in block (%u bytes)\n",pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION));
// Search
uint8_t pubkeys[66][33]; arith_uint256 bnMaxPoSdiff; uint32_t blocktimes[66]; int mids[256],nonzpkeys,i,j,externalflag; uint32_t savebits; int64_t nStart = GetTime();

Loading…
Cancel
Save