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

Behaviour when subscribing and already subscribed #10

Open
dagurval opened this issue Feb 19, 2020 · 2 comments
Open

Behaviour when subscribing and already subscribed #10

dagurval opened this issue Feb 19, 2020 · 2 comments
Labels
undefined behaviour Yet to be documented protocol behaviour

Comments

@dagurval
Copy link
Owner

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

Originally posted by @cculianu in #9 (comment)

I don't know, we should define this

@dagurval dagurval added the undefined behaviour Yet to be documented protocol behaviour label Feb 19, 2020
@cculianu
Copy link
Collaborator

cculianu commented Feb 19, 2020

I just checked both EX and Fulcrum just return the result again of the tip, basically, without doing anything extra. (i.e. you cannot be subscribed twice and get 2x the notifications -- you still get 1 notification per new header).

I guess the tip call is not strictly necessary although the spurious notifications-as-a-side-effect of subscribe can confuse simple scripts (which would be an argument in favor of the tip call).

We should define this as above I would say.. to save me having to both update EX and Fulcrum.. and to avoid having to check if any clients in the wild "depend" on the current behavior. I hope Electrs doesn't do anything too much different.

If it does, and you don't want to update it -- we can also define it as "maybe returns headers, maybe not". I'm ok with that too. :)

@dagurval
Copy link
Owner Author

I just checked both EX and Fulcrum just return the result again of the tip, basically, without doing anything extra. (i.e. you cannot be subscribed twice and get 2x the notifications -- you still get 1 notification per new header).

Sounds good to me, we can just define it as that, thanks for checking :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
undefined behaviour Yet to be documented protocol behaviour
Projects
None yet
Development

No branches or pull requests

2 participants