区块如何汇集交易(原注释节选)

邮件与论坛 · 软件发布 · 源码阅读 · 原始文件

0.1.0 · bitcoin/src/main.h · 节选 · 第 794—804 行

节选自 bitcoin/src/main.h,完整保留这段连续注释。可在下方打开原始文件核对前后代码。

文件署名:Satoshi Nakamoto · 2009-01 发布包

原文件的独立写作时间未注明。

阅读语言
//
// 节点把新交易收集到一个区块中,将它们哈希成一棵哈希树,
// 再遍历 nonce 值,使区块的哈希满足工作量证明的要求。
// 找到工作量证明的答案后,节点会向所有人广播这个区块,
// 这个区块就会被加入区块链。区块中的第一笔交易比较特殊,
// 它会创建一枚归区块创建者所有的新币。
//
// 区块会追加写入磁盘上的 blk0001.dat 文件。
// 它们在磁盘上的位置由内存中的 CBlockIndex 对象索引。
//
//
// Nodes collect new transactions into a block, hash them into a hash tree,
// and scan through nonce values to make the block's hash satisfy proof-of-work
// requirements.  When they solve the proof-of-work, they broadcast the block
// to everyone and the block is added to the block chain.  The first transaction
// in the block is a special one that creates a new coin owned by the creator
// of the block.
//
// Blocks are appended to blk0001.dat files on disk.  Their location on disk
// is indexed by CBlockIndex objects in memory.
//

核对源码来源 ↗ · 阅读原始文件 · 下载原始压缩包 · 原软件许可

文件校验值 · SHA-256

ce9da46516e3042741224a7f9061e3181a5a4d17abba72b6e82922af3753d756

阅读字号

选择适合你的字号,之后阅读会继续使用。