主页 > 安卓版imtoken > 铁杆喵 | 第一个比特币源代码
铁杆喵 | 第一个比特币源代码
安卓版imtoken 2023-03-29 06:10:00
⚠️警告⚠️:本文适合有代码基础的人阅读,也适合转朋友圈装X。
-我做了什么-
这几天一直在翻看中本聪以前的帖子,回复的邮件群信息,还有Bitcoin Pre-Release,v0.1.0,v0.1.3版本的源码。
以下是 2008 年 11 月 16 日预发行版中的信息。
-你发现了什么-
让我们一步步来看。
源文件
首先,这个版本包含四个源文件,分别是:
主.cpp
主.h
节点.cpp
节点.h
备注信息
// Copyright (c) 2008 Satoshi Nakamoto
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
评论显示代码(严格来说是源文件)是2008年生成的比特币源代码有多少行,版权属于Satoshi Nakamoto比特币源代码有多少行,也就是中本聪。
许可协议是MIT协议。 (根据内容,因为源文件没有自带单独的license文件)
代码结构(main.h)
...
;
...
static const unsigned int MAX_SIZE = 0x02000000;
...
extern map<uint256, CBlockIndex*> mapBlockIndex;
...
FILE* ;
...
class CDiskTxPos
{
...
}
mapTransactions;
...
main.h 包含 1137 行代码(包括许多无用的空行)。
从上到下的代码是:
代码风格空间和拆分命名风格偏好 - 结论 -
Pre-Release 版本中本聪出现的概率:
以上是基于 2008 年 11 月 16 日比特币 Pre-Release 版本可以看到的中本聪。