git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b4458b3
)
PPCoin: Only serialize stake to blockindex for proof-of-stake blocks
author
Sunny King
<sunnyking9999@gmail.com>
Fri, 8 Jun 2012 01:42:59 +0000 (
02:42
+0100)
committer
Sunny King
<sunnyking9999@gmail.com>
Fri, 8 Jun 2012 01:42:59 +0000 (
02:42
+0100)
src/main.h
patch
|
blob
|
history
diff --git
a/src/main.h
b/src/main.h
index
3e60fb9
..
2baf7c4
100644
(file)
--- a/
src/main.h
+++ b/
src/main.h
@@
-1334,8
+1334,16
@@
public:
READWRITE(nHeight);
READWRITE(nCheckpoint);
READWRITE(fProofOfStake);
- READWRITE(prevoutStake);
- READWRITE(nStakeTime);
+ if (fProofOfStake)
+ {
+ READWRITE(prevoutStake);
+ READWRITE(nStakeTime);
+ }
+ else if (fRead)
+ {
+ const_cast<CDiskBlockIndex*>(this)->prevoutStake.SetNull();
+ const_cast<CDiskBlockIndex*>(this)->nStakeTime = 0;
+ }
// block header
READWRITE(this->nVersion);