Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-terminating fromPParams #1671

Merged
merged 1 commit into from
May 18, 2020
Merged

Conversation

Anviking
Copy link
Member

@Anviking Anviking commented May 18, 2020

Issue Number

#1657

Overview

  • I made fromPParams not loop indefinitely and break the tip-following.

Comments

The node tip now updates correctly:

$ cardano-wallet-shelley network information
Ok.
{
    "network_tip": {
        "epoch_number": 22,
        "slot_number": 8397
    },
    "node_tip": {
        "height": {
            "quantity": 12738,
            "unit": "block"
        },
        "epoch_number": 22,
        "slot_number": 8360
    },
    "sync_progress": {
        "status": "ready"
    },
    "next_epoch": {
        "epoch_start_time": "2020-05-18T14:15:00Z",
        "epoch_number": 23
    }
}
 $ cardano-wallet-shelley network information
Ok.
{
    "network_tip": {
        "epoch_number": 22,
        "slot_number": 8398
    },
    "node_tip": {
        "height": {
            "quantity": 12739,
            "unit": "block"
        },
        "epoch_number": 22,
        "slot_number": 8398
    },
    "sync_progress": {
        "status": "ready"
    },
    "next_epoch": {
        "epoch_start_time": "2020-05-18T14:15:00Z",
        "epoch_number": 23
    }
}
  • Could have added a test that fromPParams terminates/doesn't throw, but that seemed a bit too specific. When we add Test.Integration.Scenario.API.Shelley.Wallets I think those scenarios will cover this.

@Anviking Anviking requested review from piotr-iohk and KtorZ May 18, 2020 10:39
@Anviking Anviking self-assigned this May 18, 2020
Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

Works! 🎉

@Anviking
Copy link
Member Author

bors r+

@piotr-iohk piotr-iohk added the RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG label May 18, 2020
@iohk-bors iohk-bors bot merged commit c7e9bbe into master May 18, 2020
@iohk-bors iohk-bors bot deleted the anviking/ADP-289/fix-fromPParams branch May 18, 2020 11:18
@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 18, 2020

@@ -356,7 +356,7 @@ fromPParams pp = W.TxParameters
}
where
naturalToDouble :: Natural -> Double
naturalToDouble = naturalToDouble
naturalToDouble = fromIntegral
Copy link
Member

Choose a reason for hiding this comment

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

Indeed. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants