Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

use the latest bat-* package versions #13509

Closed
mrose17 opened this issue Mar 20, 2018 · 3 comments · Fixed by #13530
Closed

use the latest bat-* package versions #13509

mrose17 opened this issue Mar 20, 2018 · 3 comments · Fixed by #13530

Comments

@mrose17
Copy link
Member

mrose17 commented Mar 20, 2018

bat-client@2.1.2
bat-publisher@2.0.16

@NejcZdovc NejcZdovc self-assigned this Mar 20, 2018
@mrose17
Copy link
Member Author

mrose17 commented Mar 20, 2018

with this in place, also make use of bat-client::memo, perhaps like this in ledger.js:

    @@ -2325,10 +2325,23 @@ const run = (state, delayTime) => {
     
       if (data) {
         let weights = []
    +
    +    let map = {}
    +    data.forEach((datum) => {
    +      map[datum.publisherKey] = underscore.extend({
    +        votes: 0
    +      }, underscore.pick(datum, [ 'verified', 'exclude', 'score', 'pinPercentage', 'percentage', 'weight' ]))
    +    })
    +
         data.forEach((datum) => {
           weights.push({publisher: datum.publisherKey, weight: datum.weight / 100.0})
         })
    -    winners = synopsis.winners(ballots, weights)
    +    winners = synopsis.winners(ballots, weights) || []
    +
    +    winners.forEach((winner) => {
    +      map[winner].votes++
    +    })
    +    client.memo('run:ballots', underscore.values(map))
       }
     
       if (!winners) winners = []

@NejcZdovc NejcZdovc added this to the 0.22.x (Beta Channel) milestone Mar 20, 2018
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 20, 2018
Resolves brave#13509

Auditors:

Test Plan:
@NejcZdovc NejcZdovc mentioned this issue Mar 20, 2018
10 tasks
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 20, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 21, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 22, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 22, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 23, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 23, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Mar 23, 2018
Resolves brave#13509

Auditors:

Test Plan:
NejcZdovc added a commit that referenced this issue Mar 23, 2018
NejcZdovc added a commit that referenced this issue Mar 23, 2018
NejcZdovc added a commit that referenced this issue Mar 23, 2018
@kjozwiak
Copy link
Member

@NejcZdovc could you please add a test plan? If there's nothing QA can do here, please tag this issue as QA/no-qa-needed.

@NejcZdovc
Copy link
Contributor

added QA/no-qa-needed

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

Successfully merging a pull request may close this issue.

5 participants