reddcoin-project / reddcoin-3.10

Reddcoin: the digital social currency
http://www.reddcoin.com
MIT License
287 stars 114 forks source link

Things to check while comparing bitcoin tree with reddcoin tree #78

Open MathyV opened 9 years ago

MathyV commented 9 years ago

ppcoin introduced MarkUnspent and DisableTransaction, I wonder if these are really necessary since bitcoin itself also has the concept of transactions disappearing when block chains become invalid.

Commit 93a18a3650292afbb441a47d1fa1b94aeb0164e3 replaces MarkSpent with AddToSpends so a similar function RemoveFromSpends was introduced to replace MarkUnspent for now in commit c2a8420

MathyV commented 9 years ago

We use IsCoinBase() and IsCoinStake() everywhere to determine if the coins are generated, making it hard to patch stuff and sometimes even forgetting it. Would it not be easier to add the IsCoinStake() check to IsCoinBase() and only use IsCoinStake() where we really need to know? This would simplify merging from / collaborating with Bitcoin a lot!

MathyV commented 9 years ago

For the watchonly addresses I think you can also watch the amount of money being staked but this isn't added to the UI yet.

laudney commented 9 years ago

In 99% cases IsCoinBase and IsCoinStake() should be side-by-side. So when merging, it's safe to make sure this is the case and we can double check in the final diff.

MathyV commented 9 years ago

I think we should add an extra function and make it so that IsCoinBase() == IsCoinPoW() || IsCoinStake(). That way we can apply a lot of patches from Bitcoin more easily and they will still fail in the places where they should fail because we don't use IsCoinBase there.