CSSG-Labs / CSSG-Labs/python-blockchain

Write new_block method for Blockchain class

オープン
#2 コメント 0 件 リアクション 0 件 担当者 1 名 @PatrickBruso が担当を希望しています GitHub で見る
enhancement good first issue
主要言語
Python
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

We need to code the new_block method for our Blockchain class. This method should create a new block in the blockchain. The parameters will be 'proof' and 'previous_hash', which should be set to a default value of 'None'.

This method should also create a 'block' dictionary that contains the following keys:
'index' which should be the next item on the chain list
'timestamp' which should be the time (you will need to import and use the time library)
'transactions' which should be the current_transactions list
'proof' which will be the parameter proof
'previous_hash' which will be the parameter 'previous_hash'

The method should then reset the list of transactions to an empty list, and append the block to the list 'chain' before returning the block.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。