Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.
Business

How does the AttachChain function work in Bitcoin Core?

in the function here AttachChain I have a code block:

    // Unless allowed, ensure wallet files are not reused across chains:
    if (!gArgs.GetBoolArg("-walletcrosschain", DEFAULT_WALLETCROSSCHAIN)) {
        WalletBatch batch(walletInstance->GetDatabase());
        CBlockLocator locator;
        if (batch.ReadBestBlock(locator) && locator.vHave.size() > 0 && chain.getHeight()) {
            // Wallet is assumed to be from another chain, if genesis block in the active
            // chain differs from the genesis block known to the wallet.
            if (chain.getBlockHash(0) != locator.vHave.back()) {
                error = Untranslated("Wallet files should not be reused across chains. Restart bitcoind with -walletcrosschain to override.");
                return false;
            }
        }
    }

I have seen CBlockLocator Since it is a constructor and does nothing if there are no arguments, vHave member of locator is always empty.Next if The statement will not execute for the following reasons:

batch.ReadBestBlock(locator) && locator.vHave.size() > 0 && chain.getHeight()

everytime falseIf I’m right, the if statement looks like this, so I think I’m missing something here if(0) So it doesn’t help.

How does the AttachChain function work in Bitcoin Core?

Source link How does the AttachChain function work in Bitcoin Core?

Related Articles

Back to top button
slot gacor