91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.01M
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-22
  • 語言: 其他
  • 標簽: 其他??

資源簡介

bitcoin_vs2017.zip

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?

#define?MESSAGE_START_SIZE?4
unsigned?char?pchMessageStart[MESSAGE_START_SIZE]?=?{?0xf9?0xbe?0xb4?0xd9?};

bool?LoadExternalBlockFile(FILE*?fileIn?CDiskBlockPos?*dbp)
{
int?nLoaded?=?0;
try?{
//?This?takes?over?fileIn?and?calls?fclose()?on?it?in?the?CBufferedFile?destructor
CBufferedFile?blkdat(fileIn?2?*?MAX_BLOCK_SERIALIZED_SIZE?MAX_BLOCK_SERIALIZED_SIZE?+?8?SER_DISK?CLIENT_VERSION);
uint64_t?nRewind?=?blkdat.GetPos();
while?(!blkdat.eof())?{
blkdat.SetPos(nRewind);
nRewind++;?//?start?one?byte?further?next?time?in?case?of?failure
blkdat.SetLimit();?//?remove?former?limit
unsigned?int?nSize?=?0;
try?{
//?locate?a?header
unsigned?char?buf[MESSAGE_START_SIZE];
blkdat.FindByte(pchMessageStart[0]);
nRewind?=?blkdat.GetPos()?+?1;
blkdat?>>?FLATDATA(buf);
if?(memcmp(buf?pchMessageStart?MESSAGE_START_SIZE))
continue;
//?read?size
blkdat?>>?nSize;
if?(nSize??MAX_BLOCK_SERIALIZED_SIZE)
continue;
}
catch?(const?std::exception&)?{
//?no?valid?block?header?found;?don‘t?complain
break;
}
try?{
//?read?block
uint64_t?nBlockPos?=?blkdat.GetPos();
if?(dbp)
dbp->nPos?=?nBlockPos;
blkdat.SetLimit(nBlockPos?+?nSize);
blkdat.SetPos(nBlockPos);
std::shared_ptr?pblock?=?std::make_shared();
CBlock&?block?=?*pblock;
blkdat?>>?block;
nRewind?=?blkdat.GetPos();

printf(“%s\n\n“?block.ToString().c_str());
}
catch?(const?std::exception&?e)?{
printf(“%s:?Deserialize?or?I/O?error?-?%s\n“?__func__?e.what());
}
nLoaded++;
}
}
catch?(const?std::runtime_error&?e)?{
printf(“System?error:?%s\n“?e.what());
}
if?(nLoaded?>?0)
printf(“Loaded?%i?blocks?from?external?file\n“?nLoaded);
return?nLoaded?>?0;
}

int?main(void)
{
//?Todo:?Change?to?the?real?path?where?you?store?the?bitcoin?block?file
char?path[]?=?“G:\\blockchain\\bitcoin\\bin\\Bitcoin\\blocks\\blk00000.dat“;

FILE?*file?=?fsbridge::fopen(path?“rb“);
LoadExternalBlockFile(file?NULL);
return?0;
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-03-01?17:45??src\
?????目錄???????????0??2018-03-01?18:41??src\532479301\
?????文件????????2257??2018-03-01?18:41??src\532479301\main_showblock.cpp
?????目錄???????????0??2018-03-01?18:42??build-aux\
?????目錄???????????0??2018-03-01?18:42??build-aux\vs\
?????文件???????12674??2018-02-27?18:51??build-aux\vs\bitcoin-config.h
?????文件????????1427??2018-03-01?17:30??build-aux\vs\bitcoin.sln
?????文件???????11089??2018-03-01?18:13??build-aux\vs\bitcoin.vcxproj
?????文件????????3488??2018-03-01?18:12??build-aux\vs\bitcoin.vcxproj.filters
?????文件?????????306??2018-03-01?18:13??build-aux\vs\packages.config

評論

共有 條評論