LCOV - code coverage report
Current view: top level - src/wallet - hdchain.cpp (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 13 13 100.0 %
Date: 2026-08-09 10:51:41 Functions: 3 3 100.0 %

          Line data    Source code
       1             : // Copyright (c) 2020-2021 The PIVX Core developers
       2             : // Distributed under the MIT software license, see the accompanying
       3             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4             : 
       5             : #include "wallet/hdchain.h"
       6             : 
       7             : #include "chainparams.h"
       8             : #include "key_io.h"
       9             : #include "tinyformat.h"
      10             : #include "util/system.h"
      11             : #include "utilstrencodings.h"
      12             : 
      13        1568 : bool CHDChain::SetNull()
      14             : {
      15        1568 :     nVersion = CURRENT_VERSION;
      16        1568 :     seed_id = CKeyID();
      17        1568 :     nExternalChainCounter = 0;
      18        1568 :     nInternalChainCounter = 0;
      19        1568 :     nStakingChainCounter = 0;
      20        1568 :     return IsNull();
      21             : }
      22             : 
      23      389128 : bool CHDChain::IsNull() const
      24             : {
      25      389128 :     return seed_id.IsNull();
      26             : }
      27             : 
      28         380 : bool CHDChain::SetSeed( const CKeyID& seedId)
      29             : {
      30             :     // Cannot be initialized twice
      31         380 :     if (!IsNull())
      32             :         return false;
      33             : 
      34         380 :     seed_id = seedId;
      35         380 :     return true;
      36             : }

Generated by: LCOV version 1.14