No description provided.
Addition of ImmatureCreditCached to MarkDirty() #8703
pull SCDeveloper wants to merge 1 commits into bitcoin:master from SCDeveloper:patch-5 changing 1 files +1 −0-
SCDeveloper commented at 12:18 AM on September 12, 2016: none
-
Addition of ImmatureCreditCached to MarkDirty() 27c8015b31
-
SCDeveloper commented at 12:18 AM on September 12, 2016: none
Why is this not added here? Yet ImmatureWatchCreditCached is? Mistake or is there a reason for it not being here?
- fanquake added the label Wallet on Sep 12, 2016
-
jonasschnelli commented at 9:34 AM on September 12, 2016: contributor
@SCDeveloper: can you elaborate what this change is trying to fix?
-
SCDeveloper commented at 12:54 PM on September 12, 2016: none
I am asking if it is missing in the first place.
-
SCDeveloper commented at 2:37 PM on September 13, 2016: none
Can anyone elaborate why it isn't in MarkDirty()????
-
laanwj commented at 3:40 PM on September 13, 2016: member
Looks like fImmatureCreditCached is never cleared except when the transaction is initialized. I don't think that is correct, unless it can never change.
-
SCDeveloper commented at 4:57 PM on September 13, 2016: none
I would of thought it would be best to have it in MarkDirty(), I have it currently within my code I am due to release shortly (Silk(SLK) & DarkSilk(DSLK)) and have no issues. I just don't understand why Bitcoin doesn't have it there?
-
morcos commented at 6:29 PM on September 13, 2016: member
utACK.
I certainly don't think it hurts to put it in MarkDirty and it makes more logical sense. I don't think it'll actually change behavior though since GetImmatureCredit returns 0 instead of accessing the cache if this test fails:
if (IsCoinBase() && GetBlocksToMaturity() > 0 && IsInMainChain())and I can't see as how the amount of the immature credit could change otherwise. -
SCDeveloper commented at 7:27 PM on September 13, 2016: none
I think it is just safer and more logical to have it covered than to not.
-
sipa commented at 9:24 PM on September 13, 2016: member
The only reason why an immature balance cached value can get invalidated is when the longest chain length decreases, which is an exceedingly rare and hard thing in Bitcoin mainnet (it requires a massive reorg crossing a retarget, with large time difference).
However, agree, for consistency and obviousness of correctness, utACK.
-
SCDeveloper commented at 9:50 PM on September 13, 2016: none
If people wouldnt mind I would like to recommit this under my public identity.
-
spencerlievens commented at 9:58 PM on September 13, 2016: contributor
Im forking the code now to recommit @sipa (SCDeveloper is another identity but for this I want to use my public identity). GitHub is really slow today.
-
spencerlievens commented at 10:30 PM on September 13, 2016: contributor
-
SCDeveloper commented at 10:31 PM on September 13, 2016: none
Please see link above
- SCDeveloper closed this on Sep 13, 2016
- DrahtBot locked this on Sep 8, 2021