Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: info_infoman on February 23, 2016, 06:56:26 PM



Title: how i can clear blockchain?
Post by: info_infoman on February 23, 2016, 06:56:26 PM
in code we don't chek  ECDSA befor chekpoint blocks, how clear in old blocks sigops in spent transaction?
if i read old blocks and clear transaction sigops in block.vtx, and write this block in old position, i catch error : ERROR: ReadBlockFromDisk : Deserialize or I/O error - ReadCompactSize() : size too large


Title: Re: how i can clear blockchain?
Post by: info_infoman on February 23, 2016, 08:29:04 PM
What operating system do you have? And this is bitcoin qt you're using, yes? Maybe you should consider not downloading the entire blockchain and invest (http://www.2xbits.com/) in something a little easier on your computer. Loading that damn thing takes a nice little chunk off of every piece of performance hardware your computer has just to run it. Let me know though, the error actually sounds quite familiar.....

I'm experimenting with blokchain size, i catch this error in qt and bitcoind, my OS win-7

what i do:
in main.cpp i add smal function:
if (!ReadBlockFromDisk(old_block, old_pindex)); //where old_pindex is index block under checkpoint
   return state.Abort("Failed to read old block");

now i catch old_block.vtx and delete from vtx spent sigops
then :
if (!WriteBlockToDisk(old_block, old_blkpos))
         return state.Abort("Failed to write old block");

so, my new coind or qt client work, and clear old spent sigops from  block vtx, but when client uses    function ReadBlockFromDisk for  read old clearing block debuger cath error Deserialize :( ???