reddcoin-project / reddcoin-3.10

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

Fix CTransaction construction #75

Open MathyV opened 9 years ago

MathyV commented 9 years ago

Logic is backwards, first we fill in the timestamp, then we set it to 0 again if it is a PoW block we are deserializing.

MathyV commented 9 years ago

Also, CTransaction should be immutable now (see 4949004d68dc08382df2c34ae519c1b1cfd60f1a) so we need to adapt staking to reflect this

MathyV commented 9 years ago

Didn't merge 4949004d68dc08382df2c34ae519c1b1cfd60f1a yet as the code relies on being able to set the time at random points, this needs to be fixed!

MathyV commented 9 years ago

Also not d38da59bf68fbb37535e2579bfb7355a16baed0e

MathyV commented 9 years ago

7f3b4e95695d50a4970e6eb91faa956ab276f161

MathyV commented 9 years ago

a90689ff9880cc76668d04beda5a5d97f2f4a76b

MathyV commented 9 years ago

d640a3ceab4f4372c2a0f738c1286cfde4b41b50

MathyV commented 9 years ago

ada5a067c75f19a724cc054286ecf2254e5dbe8f

MathyV commented 9 years ago

9004798e62e987ddf50030b17fa1881b63dd5e45

MathyV commented 9 years ago

7a19efe04069d9a1e251cdc94b25184f76d9d901

MathyV commented 9 years ago

77888d68d5b78d442a18073c663478bae35da246

MathyV commented 9 years ago

3faf1f8294065eaabe2d6d24f2fe04ee4dfd6ae2

MathyV commented 9 years ago

88dd3598d22197a22565e524cecdc08107cf76ac respend

MathyV commented 9 years ago

0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9

MathyV commented 9 years ago

b33d1f5ee512da5719b793b3867f75f1eea5cf52 4b7b1bb1ac54e067d889170757a8c45f0baaae3d 13fc83c77bb9108c00dd7709ce17719edb763273 fee estimates

MathyV commented 9 years ago

1f740ddc4d8d9312dc62bca3bf0b6632b08ee6a9

MathyV commented 9 years ago

d88af560111863c3e9c1ae855dcc287f04dffb02

MathyV commented 9 years ago

00d1980b8fb8b834cb729b213834dfb38cb01bbf

MathyV commented 9 years ago

e8097f7df164b4bf799963e5ab2539c36079187d f5a92bf9bd9e5547cb8b4c0084c7e23c36b49b70

MathyV commented 9 years ago

dc942e6f276b9fabc21f06d11cd16871d4054f82

MathyV commented 9 years ago

I managed to merge 4949004d68dc08382df2c34ae519c1b1cfd60f1a but it is not yet ideal. I had to leave the nTime initialization as it is since I don't want to break blockchain downloading and this change needs quite some testing.

If you look at commit 7f39e79 you can see the code changing nTime in various places where I had to introduce ugly hacks to make this possible with normally immutable transactions. I think this also results in wrong hash calculations in some places. This needs further investigation.

MathyV commented 9 years ago

Merged: d38da59bf68fbb37535e2579bfb7355a16baed0e 7f3b4e95695d50a4970e6eb91faa956ab276f161 a90689ff9880cc76668d04beda5a5d97f2f4a76b d640a3ceab4f4372c2a0f738c1286cfde4b41b50 ada5a067c75f19a724cc054286ecf2254e5dbe8f 9004798e62e987ddf50030b17fa1881b63dd5e45 7a19efe04069d9a1e251cdc94b25184f76d9d901 77888d68d5b78d442a18073c663478bae35da246 3faf1f8294065eaabe2d6d24f2fe04ee4dfd6ae2 88dd3598d22197a22565e524cecdc08107cf76ac 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9 b33d1f5ee512da5719b793b3867f75f1eea5cf52 4b7b1bb1ac54e067d889170757a8c45f0baaae3d 13fc83c77bb9108c00dd7709ce17719edb763273 1f740ddc4d8d9312dc62bca3bf0b6632b08ee6a9 d88af560111863c3e9c1ae855dcc287f04dffb02 00d1980b8fb8b834cb729b213834dfb38cb01bbf e8097f7df164b4bf799963e5ab2539c36079187d f5a92bf9bd9e5547cb8b4c0084c7e23c36b49b70 dc942e6f276b9fabc21f06d11cd16871d4054f82