Effective amount in getvalueforname rpc command does not return correct value #33

Closed
opened 2016-08-08 00:01:33 +02:00 by kaykurokawa · 1 comment
kaykurokawa commented 2016-08-08 00:01:33 +02:00 (Migrated from github.com)

RPC command getvalueforname does not return correct value for "effective amount"

This is because effective amount is not serialized when serializing CClaimValue ( https://github.com/lbryio/lbrycrd/blob/master/src/claimtrie.h#L50 ). Thus reading nEffectiveAmount will not return proper value until a reorder is initiated by the claimtrie.

Effective amount should be calculated by obtaining its supports. nEffectiveAmount should be a protected variable , with CClaimValue having CClaimTrie as a friend class.

RPC command getvalueforname does not return correct value for "effective amount" This is because effective amount is not serialized when serializing CClaimValue ( https://github.com/lbryio/lbrycrd/blob/master/src/claimtrie.h#L50 ). Thus reading nEffectiveAmount will not return proper value until a reorder is initiated by the claimtrie. Effective amount should be calculated by obtaining its supports. nEffectiveAmount should be a protected variable , with CClaimValue having CClaimTrie as a friend class.
kaykurokawa commented 2017-01-11 19:47:12 +01:00 (Migrated from github.com)
Fixed with https://github.com/lbryio/lbrycrd/pull/55
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LBRYCommunity/lbrycrd#33
No description provided.