>> (p.1)
    Author Topic: [PATCH] Automatic block validation  (Read 8268 times)
    bdonlan (OP)
    Full Member
    ***
    Offline Offline

    Activity: 221
    Merit: 102


    View Profile
    August 16, 2010, 02:57:55 AM
     #1

    I've written a patch to help automatically validate cached blocks after validation fixes such as the one that was pushed out today. You can find it at

    http://fushizen.net/~bd/blockverify.patch

    or

    http://github.com/bdonlan/bitcoin/commit/b205251959448ca99123f2bc95b088bf06d4ef3b

    Upon first run with this patch, all blocks will be verified, and any invalid blocks, as well as blocks orphaned by removal of such blocks, will be removed from the block index. A version stamp
    (BLOCK_VERIFY_TOKEN in db.cpp) will be then written to the db; this will cause the next run to skip the verification pass. Any future validation fixes can then simply bump BLOCK_VERIFY_TOKEN to force a revalidation of the block chain.

    Note that I may be missing some important steps when deleting the old blocks - in particular, no attempt is made to update the wallet, or to prune stored uncommitted transactions. Review would be helpful.
Page 1
Viewing Page: 1