Skip to content

Commit 2a78098

Browse files
wallet: Make sure no WalletDescriptor members are uninitialized after construction
1 parent ff046ae commit 2a78098

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wallet/walletutil.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ class WalletDescriptor
9292
{
9393
public:
9494
std::shared_ptr<Descriptor> descriptor;
95-
uint64_t creation_time;
96-
int32_t range_start; // First item in range; start of range, inclusive, i.e. [range_start, range_end). This never changes.
97-
int32_t range_end; // Item after the last; end of range, exclusive, i.e. [range_start, range_end). This will increment with each TopUp()
98-
int32_t next_index; // Position of the next item to generate
95+
uint64_t creation_time = 0;
96+
int32_t range_start = 0; // First item in range; start of range, inclusive, i.e. [range_start, range_end). This never changes.
97+
int32_t range_end = 0; // Item after the last; end of range, exclusive, i.e. [range_start, range_end). This will increment with each TopUp()
98+
int32_t next_index = 0; // Position of the next item to generate
9999
DescriptorCache cache;
100100

101101
ADD_SERIALIZE_METHODS;

0 commit comments

Comments
 (0)