Skip to content

Commit

Permalink
Fix some Travis CI Build errors (#28)
Browse files Browse the repository at this point in the history
* Properly encapsulate wallet code with ENABLE_WALLET ifdefs

* Update function params in zmqpublishnotifier
  • Loading branch information
CryptAxe committed Aug 14, 2017
1 parent fa0c95e commit aa4e514
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#include "utilmoneystr.h"
#include "validation.h"
#include "validationinterface.h"

#ifdef ENABLE_WALLET
#include "wallet/wallet.h"
#endif

#include <algorithm>
#include <boost/thread.hpp>
Expand Down Expand Up @@ -711,6 +714,7 @@ CTransaction CreateWTJoinTx(uint32_t nHeight)
if (!wjtx.vout.size())
return CTransaction();

#ifdef ENABLE_WALLET
// TODO improve fee calculation
CAmount nBaseFee = CENT;
// Calculate total group fee to be split evenly between sidechain & mainchain
Expand All @@ -727,6 +731,7 @@ CTransaction CreateWTJoinTx(uint32_t nHeight)
// leaving the rest for the mainchain miners
if (nJoinFee > 0)
wjtx.vout.push_back(CTxOut((nJoinFee / 2), SIDECHAIN_FEESCRIPT));
#endif

wjtx.vin.resize(1);
wjtx.vin[0].scriptSig = CScript() << OP_0;
Expand Down
3 changes: 1 addition & 2 deletions src/zmq/zmqpublishnotifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,11 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
{
LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex());

const Consensus::Params& consensusParams = Params().GetConsensus();
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
{
LOCK(cs_main);
CBlock block;
if(!ReadBlockFromDisk(block, pindex, consensusParams))
if(!ReadBlockFromDisk(block, pindex))
{
zmqError("Can't read block from disk");
return false;
Expand Down

0 comments on commit aa4e514

Please sign in to comment.