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

Delegate vote balance mismatch when using HTLC locks (v3) #4001

Closed
sebastijankuzner opened this issue Sep 4, 2020 · 1 comment
Closed

Delegate vote balance mismatch when using HTLC locks (v3) #4001

sebastijankuzner opened this issue Sep 4, 2020 · 1 comment
Assignees

Comments

@sebastijankuzner
Copy link
Contributor

Current Behavior

HTLC lock tests sometimes fails with the message below.

FAIL __tests__/functional/transaction-forging/htlc-lock.test.ts (248.63 s)
  Transaction Forging - HTLC Lock
    ✓ should broadcast, accept and forge it [Signed with 1 Passphase] (33625 ms)
    ✓ should broadcast, accept and forge it [Signed with 2 Passphrases] (48097 ms)
    ✓ should broadcast, accept and forge it [3-of-3 multisig] (63146 ms)
    ✕ should update delegates vote balance using locked balance when voting and unvoting delegates (80175 ms)

  ● Transaction Forging - HTLC Lock › should update delegates vote balance using locked balance when voting and unvoting delegates

    expected delegate 02f7acb179ddfddb2e220aa600921574646ac59fd3f1ae6255ada40b9a7fab75fd  to have vote balance = 300009690000000, got 300009790000000

      219 | 
      220 |         const expectedBalanceAfterVoteAgain = expectedBalanceAfterLock.minus(unvote.fee).minus(voteAgain.fee);
    > 221 |         await expect(delegateToVote).toHaveVoteBalance(expectedBalanceAfterVoteAgain.toString());
          |                                      ^
      222 |     });
      223 | });
      224 | 

      at Object.<anonymous> (__tests__/functional/transaction-forging/htlc-lock.test.ts:221:38)
          at runMicrotasks (<anonymous>)
@sebastijankuzner sebastijankuzner changed the title Delegate vote balance using HTLC lock mispmatch (v3) Delegate vote balance using HTLC lock mismatch (v3) Sep 4, 2020
@sebastijankuzner sebastijankuzner changed the title Delegate vote balance using HTLC lock mismatch (v3) Delegate vote balance mismatch when using HTLC locks (v3) Sep 4, 2020
@sebastijankuzner sebastijankuzner self-assigned this Sep 8, 2020
@sebastijankuzner
Copy link
Contributor Author

Vote mismatch occurs, because voted delegate has forged a new block and collects fee. Vote balance increased for fee amount (1 ARK), because delegate has also vote for himself in genesis block.

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