<<  >> (p.35)
    Author Topic: The Ethereum Paradox  (Read 99943 times)
    YarkoL
    Legendary
    *
    Offline Offline

    Activity: 996
    Merit: 1013


    View Profile
    March 15, 2016, 02:28:51 PM
     #681


    while (block.number != previous_block) x += 42

    No!

    Transactions/contracts/programs execute within a block (by being included in the block!). The block number will never change during execution.


    Ok, that was sloppy. When initializing the contract,
    define cutoff = block.number + N. Then increment while
    block number <= cutoff. And if you're lucky, you get to
    do that N times.

    “God does not play dice"
Page 34
Viewing Page: 35