dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Remote staking balance is calculated incorrectly #843

Closed Ruteri closed 5 years ago

Ruteri commented 5 years ago

After calling stakeat, the proposer can propose using the remote staked coin, but after staking it the source's remote_staking_balance taken from getwalletinfo is incorrect. It seems that every time the proposer uses the remote staked coin to propose, the stake is added to the balance.

Related: https://github.com/dtr-org/unit-e/pull/543

cmihai commented 5 years ago

You mean that WalletExtension::GetRemoteStakingBalance counts coins that have been spent (used to propose) by someone else?

Ruteri commented 5 years ago

You mean that WalletExtension::GetRemoteStakingBalance counts coins that have been spent (used to propose) by someone else?

I'm trying not to judge what is happening, I'm just reporting what I saw on the testnet. If I had to guess I'd say that the wallet doesn't count the coinbase's input from remote staking script as spent.