Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CO-410] Introduce NetworkMagic #3733

Merged
merged 2 commits into from
Oct 17, 2018

Conversation

intricate
Copy link
Contributor

Description

Building on the previous PR (#3715), we add the NetworkMagic datatype, which allows us to discriminate addresses originating from different networks.

In order to make this commit as simple and easy-to-review as possible, I stub out the added arguments of type NetworkMagic with a dummy variable: fixedNM. This puts off the (fairly involved) work of threading NetworkMagic values from the nearest occurrence of ProtocolMagic to where said values are needed.

The remainder of the work will come in a separate commit.

Linked issue

https://iohk.myjetbrains.com/youtrack/issue/CO-410

Type of change

  • [~] 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • [~] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • [~] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • [~] 🔨 New or improved tests for existing code
  • [~] ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • [~] CHANGELOG entry has been added and is linked to the correct PR on GitHub.
    ^ there is no 1.3.1 section in the CHANGELOG, and this is dev work on a release branch, so I'm skipping this.

Testing checklist

  • [~] I have added tests to cover my changes.
  • All new and existing tests passed.
    ^ no tests were added because these changes introduce new capabilities which are not used yet. Thus the behavior is the same, and the existing tests should be adequate.

@intricate intricate self-assigned this Oct 10, 2018
@intricate intricate force-pushed the i+m/develop/CO-410/introduce-networkmagic branch 5 times, most recently from fb7ae41 to b16ec48 Compare October 15, 2018 22:37
@intricate intricate changed the title [DO NOT MERGE] [WIP] [CO-410] Introduce NetworkMagic [CO-410] Introduce NetworkMagic Oct 15, 2018
@Jimbo4350 Jimbo4350 force-pushed the i+m/develop/CO-410/introduce-networkmagic branch from b16ec48 to b3d6ed2 Compare October 16, 2018 12:53
Copy link
Contributor

@mhuesch mhuesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. We should remove those TODOs. The other comments are optional.

What's up with wallet/test/wallet-db-1.1.1/open.lock? It seems it was added as a 0-line file in this PR.

chain/src/Pos/Chain/Txp/Toil/Failure.hs Outdated Show resolved Hide resolved
client/src/Pos/Client/Txp/Balances.hs Outdated Show resolved Hide resolved
core/src/Pos/Core/Common/AddrAttributes.hs Show resolved Hide resolved
lib/src/Pos/Util/UserSecret.hs Show resolved Hide resolved
@Jimbo4350 Jimbo4350 force-pushed the i+m/develop/CO-410/introduce-networkmagic branch 2 times, most recently from b3d6ed2 to c68365e Compare October 16, 2018 20:31
@intricate intricate force-pushed the i+m/develop/CO-410/introduce-networkmagic branch 3 times, most recently from 67b594b to 834ac93 Compare October 16, 2018 23:29
@erikd erikd force-pushed the i+m/develop/CO-410/introduce-networkmagic branch from 834ac93 to 8e0a035 Compare October 17, 2018 05:03
@erikd erikd force-pushed the i+m/develop/CO-410/introduce-networkmagic branch from 8e0a035 to 10483c1 Compare October 17, 2018 05:03
@erikd
Copy link
Member

erikd commented Oct 17, 2018

Hydra seemed to have screwed up the building of this PR so I rebased this and force pushed.

@mhuesch mhuesch merged commit e9daaa6 into develop Oct 17, 2018
@mhuesch mhuesch deleted the i+m/develop/CO-410/introduce-networkmagic branch October 17, 2018 14:28
@mhuesch
Copy link
Contributor

mhuesch commented Oct 17, 2018

Merging before any conflicts arise!

KtorZ pushed a commit that referenced this pull request Nov 9, 2018
…oduce-networkmagic

[CO-410] Introduce NetworkMagic
KtorZ pushed a commit to input-output-hk/cardano-wallet-legacy that referenced this pull request Nov 9, 2018
…hk/i+m/develop/CO-410/introduce-networkmagic

[CO-410] Introduce NetworkMagic
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants