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: 2025-02-23 09:33:43 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        1816 : bool CHDChain::SetNull()
      14             : {
      15        1816 :     nVersion = CURRENT_VERSION;
      16        1816 :     seed_id = CKeyID();
      17        1816 :     nExternalChainCounter = 0;
      18        1816 :     nInternalChainCounter = 0;
      19        1816 :     nStakingChainCounter = 0;
      20        1816 :     return IsNull();
      21             : }
      22             : 
      23     1600550 : bool CHDChain::IsNull() const
      24             : {
      25     1600550 :     return seed_id.IsNull();
      26             : }
      27             : 
      28         488 : bool CHDChain::SetSeed( const CKeyID& seedId)
      29             : {
      30             :     // Cannot be initialized twice
      31         488 :     if (!IsNull())
      32             :         return false;
      33             : 
      34         488 :     seed_id = seedId;
      35         488 :     return true;
      36             : }

Generated by: LCOV version 1.14