blockData = strconv.FormatInt(block.Index, 10) + strconv.FormatInt(block.Timestamp, 10) + string(block.PrevBlockHash) + string(block.Data)
2020-02-24
最赞回答 / 慕粉1470905606
//注意int转string不能这样:string(b.Index) + string(b.TimeStamp) blockData := strconv.Itoa(int(b.Index))+strconv.Itoa(int(b.TimeStamp))+b.PreBlockHash fmt.Println(blockData)这是因为老师的int转string语句写错了,
stri...
2019-06-11