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

#9 proof of stake validity #18

Merged
merged 8 commits into from Mar 2, 2017
Merged

Conversation

aguycalled
Copy link
Member

Proof of Stake fully tested. Branch candidate to merge with master.

@@ -360,7 +360,7 @@ case $host in

AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"])
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
OBJCXXFLAGS="$CXXFLAGS"
OBJCXXFLAGS="-std=c++11 $CXXFLAGS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will also need to add the -lcurl flag somewhere here, but that is only needed on the navtech branch currently

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of directly adding -lcurl in CFLAGS, I'd add a check for the library in configure.ac. Regarding this branch everything is ok.

@@ -1178,14 +1178,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
if (tx.IsCoinStake())
return state.DoS(100, false, REJECT_INVALID, "coinstake");

// Don't relay version 2 transactions until CSV is active, and we can be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the broadcast error i was hitting right? So we are happy to just remove the check? No other impact?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the code overall, it is safe to remove it.

@@ -7769,11 +7763,11 @@ int64_t GetProofOfStakeReward(int nHeight, int64_t nCoinAge, int64_t nFees)
int64_t nRewardCoinYear;
nRewardCoinYear = MAX_MINT_PROOF_OF_STAKE;

if(nHeight < 7 * DAILY_BLOCKCOUNT)
if(nHeight-1 < 7 * DAILY_BLOCKCOUNT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking into this, wondering why the reward is different for under 1 week

Copy link
Member Author

@aguycalled aguycalled Mar 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is like this in NavCoin original code.

https://github.com/navcoindev/navcoin2/blob/master/src/main.cpp Line 1138

@proletesseract proletesseract merged commit 19961a6 into master Mar 2, 2017
@proletesseract proletesseract deleted the #9-proof-of-stake-validity branch March 2, 2017 23:38
proletesseract added a commit that referenced this pull request May 3, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants