如何开采成因块?

时间:2018-02-25 09:56:40

标签: c++ bitcoin

我正在克隆最新的莱特币来源。

因此,对于我的创世块,我写在chainparams.cpp,

const CChainParams& chainparams = Params();
    while(!CheckProofOfWork(genesis.GetHash(), genesis.nBits, chainparams.GetConsensus())){ ++genesis.nNonce; }

但是当尝试编译时,会出现错误,

lee@newlite:~/Desktop/xcoin/src$ make
make[1]: Entering directory '/home/lee/Desktop/xcoin/src'
make[2]: Entering directory '/home/lee/Desktop/xcoin'
make[2]: Leaving directory '/home/lee/Desktop/xcoin'
  CXX      libbitcoin_common_a-chainparams.o
  AR       libbitcoin_common.a
  CXXLD    xcoind
  CXXLD    xcoin-tx
libbitcoin_common.a(libbitcoin_common_a-chainparams.o): In function `CMainParams::CMainParams()':
/home/lee/Desktop/xcoin/src/chainparams.cpp:127: undefined reference to `CheckProofOfWork(uint256, unsigned int, Consensus::Params const&)'
collect2: error: ld returned 1 exit status
Makefile:3663: recipe for target 'xcoin-tx' failed
make[1]: *** [xcoin-tx] Error 1
make[1]: Leaving directory '/home/lee/Desktop/xcoin/src'
Makefile:9337: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

如何解决? 感谢。

0 个答案:

没有答案