Add Block.Creator and Block.Nonce

This commit is contained in:
Nex 2020-04-21 00:46:04 +08:00
parent 9d0a08fe5d
commit 652b633e71
4 changed files with 47 additions and 9 deletions

View File

@ -400,6 +400,20 @@
<td><p>区块的哈希,当区块处于待确认状态时为`null` </p></td>
</tr>
<tr>
<td>creator</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p>产块者账户地址 </p></td>
</tr>
<tr>
<td>nonce</td>
<td><a href="#uint64">uint64</a></td>
<td></td>
<td><p>这个区块之前产块者产生的区块数量 </p></td>
</tr>
<tr>
<td>parent_hashes</td>
<td><a href="#bytes">bytes</a></td>

View File

@ -127,6 +127,26 @@
"ismap": false,
"defaultValue": ""
},
{
"name": "creator",
"description": "产块者账户地址",
"label": "",
"type": "bytes",
"longType": "bytes",
"fullType": "bytes",
"ismap": false,
"defaultValue": ""
},
{
"name": "nonce",
"description": "这个区块之前产块者产生的区块数量",
"label": "",
"type": "uint64",
"longType": "uint64",
"fullType": "uint64",
"ismap": false,
"defaultValue": ""
},
{
"name": "parent_hashes",
"description": "父区块的哈希",

View File

@ -92,6 +92,8 @@
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | 区块的哈希,当区块处于待确认状态时为`null` |
| creator | [bytes](#bytes) | | 产块者账户地址 |
| nonce | [uint64](#uint64) | | 这个区块之前产块者产生的区块数量 |
| parent_hashes | [bytes](#bytes) | repeated | 父区块的哈希 |
| witnesses | [bytes](#bytes) | repeated | 见证者账户地址 |
| timestamp | [int64](#int64) | | 区块产生时的 UNIX 时间戳,单位为秒 |

View File

@ -29,15 +29,17 @@ message Transaction {
}
message Block {
bytes hash = 1; // `null`
repeated bytes parent_hashes = 2; //
repeated bytes witnesses = 3; //
int64 timestamp = 4; // UNIX
uint64 size = 5; //
uint32 transaction_count = 6; //
bytes transactions_root = 7; //
repeated Transaction transactions = 8; //
repeated bytes transaction_hashes = 9; // 20
bytes hash = 1; // `null`
bytes creator = 2; //
uint64 nonce = 3; //
repeated bytes parent_hashes = 4; //
repeated bytes witnesses = 5; //
int64 timestamp = 6; // UNIX
uint64 size = 7; //
uint32 transaction_count = 8; //
bytes transactions_root = 9; //
repeated Transaction transactions = 10; //
repeated bytes transaction_hashes = 11; // 20
}
message Contract {