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

Websockets - subscribe to votes #1908

Merged
merged 4 commits into from Apr 18, 2019

Conversation

@guilhermelawless
Copy link
Contributor

commented Apr 18, 2019

Related: #1901 .

{
  "topic": "vote",
  "time": "1554995525343",
  "message": {
    "account": "xrb_1n5aisgwmq1oibg8c7aerrubboccp3mfcjgm8jaas1fwhxmcndaf4jrt75fy",
    "signature": "1950700796914893705657789944906107642480343124305202910152471520450456881722545967829502369630995363643731706156278026749554294222131169148120786048025353",
    "sequence": "855471574",
    "blocks": [
      "6FB9DE5D7908DEB8A2EA391AEA95041587CBF3420EF8A606F1489FECEE75C869"
    ]
  }
}

Added the ability to filter by representative as well, very similarly to the other filtering options. I think this one has no performance penalties, just a O(1) search in an unordered_set.

A good filter would also be rebroadcasting_only or a minimum weight. What do you think?

@clemahieu
Copy link
Collaborator

left a comment

Great feature, this is going to be far, far better than vote log parsing.

{
// Do not insert the given raw data to keep old prefix support
representatives.insert (result_l.to_account ());
}

This comment has been minimized.

Copy link
@clemahieu

clemahieu Apr 18, 2019

Collaborator

Can we log if the account doesn't decode correctly? It seems like on a type-o someone could be confused as to why it's not working.

This comment has been minimized.

Copy link
@guilhermelawless

guilhermelawless Apr 18, 2019

Author Contributor

Yeah makes more sense to log, thanks! Also logging if the resulting filter is empty.

Note to change documentation which warned about this.

@guilhermelawless

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

So, for now, have only representatives as a filter if you agree.

Updated documentation WebSockets.zip

@cryptocode
Copy link
Collaborator

left a comment

LGTM

@SergiySW
Copy link
Collaborator

left a comment

Looking good

@cryptocode cryptocode merged commit 1e09b14 into nanocurrency:master Apr 18, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cryptocode

This comment has been minimized.

Copy link
Collaborator

commented Apr 18, 2019

@guilhermelawless guilhermelawless deleted the guilhermelawless:websockets/votes branch Apr 19, 2019

@zhyatt zhyatt moved this from During RC to RC2 (2019-05-06) in V19 May 6, 2019

@zhyatt zhyatt moved this from RC2 (2019-05-06) to CP3/RC 1 (2019-04-26) in V19 May 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.