Fix confirmations being 1 block too late

block.number refers to the last mined block, so we need to add +1 to
wait from the current block on (the one in which this function is
executed).
This commit is contained in:
Basti 2021-01-14 15:36:55 +01:00
parent 89829ee81f
commit 2238ccf40e
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72

View File

@ -164,7 +164,7 @@ contract Contribution is AragonApp {
if (contributionId < 10) {
c.confirmedAtBlock = block.number;
} else {
c.confirmedAtBlock = block.number + blocksToWait;
c.confirmedAtBlock = block.number + 1 + blocksToWait;
}
contributionsCount++;