Open MathyV opened 9 years ago
Also, CTransaction should be immutable now (see 4949004d68dc08382df2c34ae519c1b1cfd60f1a) so we need to adapt staking to reflect this
Didn't merge 4949004d68dc08382df2c34ae519c1b1cfd60f1a yet as the code relies on being able to set the time at random points, this needs to be fixed!
Also not d38da59bf68fbb37535e2579bfb7355a16baed0e
7f3b4e95695d50a4970e6eb91faa956ab276f161
a90689ff9880cc76668d04beda5a5d97f2f4a76b
d640a3ceab4f4372c2a0f738c1286cfde4b41b50
ada5a067c75f19a724cc054286ecf2254e5dbe8f
9004798e62e987ddf50030b17fa1881b63dd5e45
7a19efe04069d9a1e251cdc94b25184f76d9d901
77888d68d5b78d442a18073c663478bae35da246
3faf1f8294065eaabe2d6d24f2fe04ee4dfd6ae2
88dd3598d22197a22565e524cecdc08107cf76ac respend
0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9
b33d1f5ee512da5719b793b3867f75f1eea5cf52 4b7b1bb1ac54e067d889170757a8c45f0baaae3d 13fc83c77bb9108c00dd7709ce17719edb763273 fee estimates
1f740ddc4d8d9312dc62bca3bf0b6632b08ee6a9
d88af560111863c3e9c1ae855dcc287f04dffb02
00d1980b8fb8b834cb729b213834dfb38cb01bbf
e8097f7df164b4bf799963e5ab2539c36079187d f5a92bf9bd9e5547cb8b4c0084c7e23c36b49b70
dc942e6f276b9fabc21f06d11cd16871d4054f82
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.
Merged: d38da59bf68fbb37535e2579bfb7355a16baed0e 7f3b4e95695d50a4970e6eb91faa956ab276f161 a90689ff9880cc76668d04beda5a5d97f2f4a76b d640a3ceab4f4372c2a0f738c1286cfde4b41b50 ada5a067c75f19a724cc054286ecf2254e5dbe8f 9004798e62e987ddf50030b17fa1881b63dd5e45 7a19efe04069d9a1e251cdc94b25184f76d9d901 77888d68d5b78d442a18073c663478bae35da246 3faf1f8294065eaabe2d6d24f2fe04ee4dfd6ae2 88dd3598d22197a22565e524cecdc08107cf76ac 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9 b33d1f5ee512da5719b793b3867f75f1eea5cf52 4b7b1bb1ac54e067d889170757a8c45f0baaae3d 13fc83c77bb9108c00dd7709ce17719edb763273 1f740ddc4d8d9312dc62bca3bf0b6632b08ee6a9 d88af560111863c3e9c1ae855dcc287f04dffb02 00d1980b8fb8b834cb729b213834dfb38cb01bbf e8097f7df164b4bf799963e5ab2539c36079187d f5a92bf9bd9e5547cb8b4c0084c7e23c36b49b70 dc942e6f276b9fabc21f06d11cd16871d4054f82
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.