In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Bitcoin node receives a block, will check and confirm, as follows:
The key is to check the transactions in the block further:
1.// First transaction must be coinbase, the rest must not be
2.if (vtx.empty() || ! vtx[0].IsCoinBase())
return error("CheckBlock() : first tx is not coinbase");
4.for (int i = 1; i
< vtx.size(); i++)if (vtx[i].IsCoinBase())return error("CheckBlock() : more than one coinbase"); 8.// Check transactions 循环检查所有的交易,这一步骤很关键,所以交易不能随便改,大家都在检查 9.foreach(const CTransaction& tx, vtx) if (!tx.CheckTransaction())return error("CheckBlock() : CheckTransaction failed"); 13.// Check proof of work matches claimed amount 14.if (CBigNum().SetCompact(nBits) >bnProofOfWorkLimit)
return error("CheckBlock() : nBits below minimum work");
16.if (GetHash() > CBigNum().SetCompact(nBits).getuint256())return error("CheckBlock() : hash doesn't match nBits");
19.// Check merkleroot
20.if (hashMerkleRoot != BuildMerkleTree())
return error("CheckBlock() : hashMerkleRoot mismatch");
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.