-
Notifications
You must be signed in to change notification settings - Fork 173
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
Weird rounding function #303
Comments
Good find! the length of TotalSubsidy is always more then 7 in length. Am I reading that correct? Rounds to 8 decimal places and adds 0.00000123 to maintain 8 decimal places in case it rounds to less then 8 decimal places? if the length is greater the 7 (which is always) it removes last 4 of the length and add "1024" X.XXXXXXXX -> X.XXXX0124 I don't see why you would round it up just to have the if statement be true to remove last 4 to add "0124" I understand that if the ending decimal place no matter where in the string is a 0 it is not kept and could understand a +0.00000001 if the length is less then 10 making sure you always have least 0.00000001 to maintain 8 decimal places. seems like a patch job gone somewhere beyond? |
It seems to be used to determine if a transaction is interest or PoR, rpcwallet.cpp:
Surely there must be a more straight forward way of doing that? |
interesting way to do it but makes sense. Might be another way better but My guess is because there is no proof-of-research flags in the transactions this is a easy way for them to be identified i guess. the transactions it checks least from me coping the transaction ids in transaction history just shows inputs/outputs but nothing i can tell what is what really. And at end of it shows the mint as interest with type = interest. |
More research is needed. When I doubleclick por transaction, it shows me the id and stuff. But in getblock x true output, this por transaction is actually the second one and without hashboinc. The coinbase one with hashboinc is first and it has zero input and output. |
@tomasbrod yea i noticed that as well. I was gonna original post saying use the hashbonic till i realized the second one didn't have that information. so that one went right out the door.
Something consistent in both researcher and investor is GRCaddress. and the research subsidy field in hashboinc. Just some ideas. It would of defiantly been better if there was a flag in the transaction from the beginning of time which stated whether it was PoR or Interest. |
Keeping this open as a reminder for improvements to the transaction dialog. |
PR to deal with this is merged. Closing. |
DPoR reward is affected by this very weird function. Discovered by am2on on IRC. It makes reward amount always end with decimals "0124".
Relevant code main.cpp:2053
The text was updated successfully, but these errors were encountered: