Skip to content

Commit

Permalink
Fix lwmapos crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jl777 committed Nov 24, 2018
1 parent 222e4ce commit 89296c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CChainPower;

static const int SPROUT_VALUE_VERSION = 1001400;
static const int SAPLING_VALUE_VERSION = 1010100;
extern int32_t ASSETCHAINS_LWMAPOS;
//extern int32_t ASSETCHAINS_LWMAPOS;

struct CDiskBlockPos
{
Expand Down Expand Up @@ -449,9 +449,9 @@ class CBlockIndex

bool IsVerusPOSBlock() const
{
if ( ASSETCHAINS_LWMAPOS != 0 )
//if ( ASSETCHAINS_LWMAPOS != 0 )
return GetBlockHeader().IsVerusPOSBlock();
else return(0);
//else return(0);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,11 +1159,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)

// set the hash algorithm to use for this chain
extern uint32_t ASSETCHAINS_ALGO, ASSETCHAINS_VERUSHASH;
CVerusHash::init();
CVerusHashV2::init();
if (ASSETCHAINS_ALGO == ASSETCHAINS_VERUSHASH)
{
// initialize VerusHash
CVerusHash::init();
CVerusHashV2::init();
CBlockHeader::SetVerusHash();
}

Expand Down
6 changes: 3 additions & 3 deletions src/primitives/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "uint256.h"
#include "arith_uint256.h"

extern int32_t ASSETCHAINS_LWMAPOS;
//extern int32_t ASSETCHAINS_LWMAPOS;

/** Nodes collect new transactions into a block, hash them into a hash tree,
* and scan through nonce values to make the block's hash satisfy proof-of-work
Expand Down Expand Up @@ -111,9 +111,9 @@ class CBlockHeader

bool IsVerusPOSBlock() const
{
if ( ASSETCHAINS_LWMAPOS != 0 )
//if ( ASSETCHAINS_LWMAPOS != 0 )
return nNonce.IsPOSNonce();
else return(0);
//else return(0);
}

void SetVerusPOSTarget(uint32_t nBits)
Expand Down

0 comments on commit 89296c9

Please sign in to comment.