Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Improve stub server #102

Merged

Conversation

hasufell
Copy link

@hasufell hasufell commented Oct 23, 2020

  1. expose a cli option to start the stub server in test-mode
  2. add an endpoint to insert pool metadata manually in test-mode

Related: #97

@hasufell hasufell force-pushed the hasufell/PR/improve-stubbed-testing branch from c2c678d to 09ed767 Compare October 23, 2020 15:31
@hasufell
Copy link
Author

hasufell commented Oct 23, 2020

I really don't know what's going on with the hashes... I'm inserting the exact same metadata from testnet into the SMASH mock DB manually and the hash will not match the one from testnet... the wallet will always barf out:

[cardano-wallet.pools-engine:Info:84] [2020-10-23 16:55:22.44 UTC] Fetching metadata with hash cc019105 from http://localhost:3100/api/v1/metadata/5ee7591bf30eaa4f5dce70b4a676eb02d5be8012d188f04fe3beffb0/cc019105f084aef2a956b2f7f2c0bf4e747bf7696705312c244620089429df6f
[cardano-wallet.pools-engine:Warning:84] [2020-10-23 16:55:22.45 UTC] Failed to fetch metadata with hash cc019105: Metadata hash mismatch. Saw: e8685e47a97c73fd04735b10c51e0b1fe3a6029490c90bf8e85fc7b88cef2021, but expected: cc019105f084aef2a956b2f7f2c0bf4e747bf7696705312c244620089429df6f

Edit: figured it out

Copy link
Contributor

@ksaric ksaric left a comment

Choose a reason for hiding this comment

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

Please fix the inlined code and will approve and merge.

src/Lib.hs Outdated Show resolved Hide resolved
src/Lib.hs Outdated Show resolved Hide resolved
src/Types.hs Outdated Show resolved Hide resolved
@ksaric
Copy link
Contributor

ksaric commented Oct 26, 2020

Also, I think you will need to rebase. I would have fixed the branch but I see you forked it. In the future, please keep the branches in this repo. If you don't have permission, just ping me in Slack.

@hasufell
Copy link
Author

Also, I think you will need to rebase. I would have fixed the branch but I see you forked it. In the future, please keep the branches in this repo. If you don't have permission, just ping me in Slack.

Yes, I don't think I have permissions

@ksaric
Copy link
Contributor

ksaric commented Oct 26, 2020

Also, I think you will need to rebase. I would have fixed the branch but I see you forked it. In the future, please keep the branches in this repo. If you don't have permission, just ping me in Slack.

Yes, I don't think I have permissions

Added you, you now have write access.

@hasufell hasufell force-pushed the hasufell/PR/improve-stubbed-testing branch from de57d39 to 5009f6e Compare October 26, 2020 11:40
@hasufell
Copy link
Author

Applied comments and rebased

Copy link
Contributor

@ksaric ksaric left a comment

Choose a reason for hiding this comment

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

Better.

@ksaric
Copy link
Contributor

ksaric commented Oct 26, 2020

bors r+

@hasufell
Copy link
Author

Btw, unrelated to this PR, but I noticed during compilation

[21 of 23] Compiling Cardano.SMASH.DBSync.SmashDbSync

/home/jule/git/iohk/smash-clean/src/Cardano/SMASH/DBSync/SmashDbSync.hs:221:9: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In a case alternative:
        Patterns not matched:
            (GenesisByron _)
            (GenesisShelley _)
    |
221 |         case genCfg of
    |         ^^^^^^^^^^^^^^...

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 26, 2020

Build succeeded:

@iohk-bors iohk-bors bot merged commit 9aee92e into input-output-hk:master Oct 26, 2020
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.

2 participants