From 4d5e53e7b21c8c2301dc45fc5ab6a3630ae20bca Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Wed, 10 Jan 2018 14:20:31 +0000 Subject: Initialise left/right consensus branches to null (#1435) Strictly speaking the left/right consensus branches haven't been initialised so contain random values. Most of the time these happen to be null, but sometimes causes client crashes (at least it does in 1.15, but fixing in earlier versions to be sure). --- src/consensus/params.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/consensus') diff --git a/src/consensus/params.h b/src/consensus/params.h index 98c744149..250441b2e 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -82,8 +82,8 @@ struct Params { /** Height-aware consensus parameters */ uint32_t nHeightEffective; // When these parameters come into use - struct Params *pLeft; // Left hand branch - struct Params *pRight; // Right hand branch + struct Params *pLeft = nullptr; // Left hand branch + struct Params *pRight = nullptr; // Right hand branch const Consensus::Params *GetConsensus(uint32_t nTargetHeight) const; }; } // namespace Consensus -- cgit v1.2.3