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

Cannot use BlockIDHash for fetching rights #179

Open
utdrmac opened this issue Jan 20, 2021 · 1 comment
Open

Cannot use BlockIDHash for fetching rights #179

utdrmac opened this issue Jan 20, 2021 · 1 comment

Comments

@utdrmac
Copy link
Contributor

utdrmac commented Jan 20, 2021

bakingRightsFilter := rpc.BakingRightsInput{
	BlockID:     rpc.BlockIDHash("BLzGD63HA4RP8Fh5xEtvdQSMKa2WzJMZjQPNVUc4Rqy8Lh5BEY1"),
	Level:       nextLevelToBake,
	Delegate:    (*bakerPkh),
	MaxPriority: maxBakePriority,
}

cannot use rpc.BlockIDHash("BLzGD63HA4RP8Fh5xEtvdQSMKa2WzJMZjQPNVUc4Rqy8Lh5BEY1") (type rpc.BlockIDHash) as type rpc.BlockID in field value:
rpc.BlockIDHash does not implement rpc.BlockID (ID method has pointer receiver)

@utdrmac
Copy link
Contributor Author

utdrmac commented Jan 20, 2021

Umm... what?

var h rpc.BlockIDHash = block.Hash

./baking.go:83:6: cannot use block.Hash (type string) as type rpc.BlockIDHash in assignment

Yet this works: var h rpc.BlockIDHash = "BLzGD63HA4RP8Fh5xEtvdQSMKa2WzJMZjQPNVUc4Rqy8Lh5BEY1"

Both strings, why doesn't the above work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant