CRDS / Credits

Credits (CRDS) - An Evolving Currency For An Evolving Society
https://crds.co
Other
12 stars 14 forks source link

Build fails when "--disable-wallet" compile-time flag is used #21

Closed gwestwood closed 5 years ago

gwestwood commented 5 years ago

Describe the issue

When trying to build with credit binaries without the wallet compiled in, it fails with an error.

Steps to reproduce

  1. Follow build steps, except replace ./configure with: ./configure --disable-wallet
  2. make as usual.

Expected behavior (tell us what should happen)

Build completes successfully.

Actual behavior (tell us what happens instead)

Build fails with the error:

miner.cpp: In function ‘void CreditsMiner(const CChainParams&)’: miner.cpp:570:89: error: too few arguments to function ‘std::unique_ptr CreateNewBlock(const CChainParams&, const CScript&)’ pblocktemplate = std::unique_ptr (CreateNewBlock(chainparams)); ^ miner.cpp:202:33: note: declared here std::unique_ptr CreateNewBlock(const CChainParams& chainparams, const CScript& scriptPubKeyIn) ^ Makefile:5376: recipe for target 'libcredits_server_a-miner.o' failed

What platform are you using (Linux, Windows, Mac)

Linux.

andrewtookay commented 5 years ago

I've looked into it right now and it is a pretty simple fix, it's most probably old code that right now has no use and it actually turned into a bug.

This part starting at line 575 in miner.cpp

ifdef ENABLE_WALLET

        pblocktemplate = std::unique_ptr<CBlockTemplate> (CreateNewBlock(chainparams, coinbaseScript->reserveScript));

else

        pblocktemplate = std::unique_ptr<CBlockTemplate> (CreateNewBlock(chainparams));

endif

will be changed to

pblocktemplate = std::unique_ptr (CreateNewBlock(chainparams, coinbaseScript->reserveScript));

andrewtookay commented 5 years ago

Fixed in v1.3.1.0.