Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • crown-core crown-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 75
    • Issues 75
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Crown
  • crown-corecrown-core
  • Issues
  • #260

Closed
Open
Created Nov 13, 2018 by Zhenzhen Zhan@zhanzhenzhenDeveloper

Make "address prefix" (and maybe also other parts) regtest compatible

In bitcore-node-crown testing code, it's using the command "crownd --regtest". However, the test couldn't pass now.

This is because currently in some parts of the core's address prefix code, regtest is mistakenly treated as livenet. For example, in base58.cpp, bCBase58Data::GetVersionBytes(), there is:

    if(Params().NetworkID() == CBaseChainParams::TESTNET)
    {
        // Testnet has 't' in front of the prefix
        nVersionBytes = m_VersionBytesTest;
    }

This makes only CBaseChainParams::TESTNET treated as testnet, and makes both CBaseChainParams::LIVENET and CBaseChainParams::REGTEST treated as livenet.

I think there may be also other parts, which is not related to the address prefix feature, also having this issue. We may need to search for every CBaseChainParams::TESTNET to decide whether it needs to fix.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking