go實現區塊鏈[3]-遍歷區塊鏈與數據庫持久化

新建blockchain.go

go實現區塊鏈[3]-1.png

增長newBlock的方法,根據前一個區塊的hash建立區塊:

go實現區塊鏈[3]-2.png

image.png

相關文章
相關標籤/搜索