Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Fetch block chain tip without subscribing #9

Closed
dagurval opened this issue Feb 19, 2020 · 6 comments
Closed

Fetch block chain tip without subscribing #9

dagurval opened this issue Feb 19, 2020 · 6 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@dagurval
Copy link
Owner

Currently it looks like you have to subscribe to headers if you want to know the block chain tip

@dagurval dagurval added the enhancement New feature or request label Feb 19, 2020
@cculianu
Copy link
Collaborator

Hmm. Yeah I guess that's an imperfection. blockchain.headers.gettip? get_tip? tip?

@dagurval
Copy link
Owner Author

It's kind of annoying when I just want to hack together a script that pulls the tip every few seconds. Now I have to do the proper way :-).

@dagurval
Copy link
Owner Author

I like blockchain.headers.tip.

it's kind of weird though when the two existing header methods are under blockchain.block, while one is in blockchain.headers.

@cculianu
Copy link
Collaborator

Ah yeah that makes sense. And I believe right now it actually complains that you're already subscribed, right? IIRC...

I like blockchain.headers.tip.

So do I. Feel free to go with that one. I guess takes 0 parameters [] and returns the same result you'd get from headers.subscribe, right?

@dagurval
Copy link
Owner Author

I guess takes 0 parameters [] and returns the same result you'd get from headers.subscribe, right?

👍

@dagurval dagurval added the duplicate This issue or pull request already exists label Jun 26, 2020
@dagurval
Copy link
Owner Author

Closing in favour of #20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants