Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Conversation

@larskuhtz
Copy link
Contributor

resolves #16

This is a breaking change.

main/Main.hs Outdated
instance ToJSON Miner where
toJSON (Miner (MinerPublicKey k)) = object
[ "account" .= k
[ "account" .= ("k:" <> k)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that we should unconditionally prepend the k:. This is pretty opaque and has some failure modes. What about allowing the user to also configure the account name? And if they don't supply one, then we can default to k:.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, I'd like to keep it simple. I am not aware of a scenario where someone wanted to mine to anything but just a simple key.

Maybe pools have more sophisticated requirements (e.g. multi-sig accounts). But at the current state chainweb-mining-client is useful mostly for solo-miners.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a --account command line option, that default to the k: account for the public key.

@larskuhtz larskuhtz merged commit 85b9f78 into master Nov 23, 2021
@larskuhtz larskuhtz deleted the feature/k-accounts branch November 23, 2021 20:45
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.

Cannot mine to k account

3 participants