go实现区块链[1]-block
12345678910111213141516171819202122232425262728293031323334353637383940414243444546//定义区块结构体type Block struct{ Version int32 PrevBlockHash []byte Merkleroot []byte Hash []byte Time int32 Bits int32 Nonce int32}//序列化func (b* Block) Serialize() []byte{ var encoded bytes.Buffer enc:= gob.NewEncoder(&encoded) err:= enc.Encode(b) if err!=nil{ log.Panic(...阅读全文