1 Star 0 Fork 0

艾鸥科技/go-aiou

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
block.go 777 Bytes
一键复制 编辑 原始数据 按行查看 历史
张卓 提交于 2020-05-10 14:55 +08:00 . init
package itest
import (
"gitee.com/aiou-official/go-aiou/rpc/pb"
)
// Block is the block object
type Block struct {
Hash string
Version int64
ParentHash string
TxMerkleHash string
TxReceiptMerkleHash string
Number int64
Witness string
Time int64
}
// NewBlockFromPb returns a new Block instance from protobuffer struct.
func NewBlockFromPb(b *rpcpb.Block) *Block {
ret := &Block{
Hash: b.Hash,
Version: b.Version,
ParentHash: b.ParentHash,
TxMerkleHash: b.TxMerkleHash,
TxReceiptMerkleHash: b.TxReceiptMerkleHash,
Number: b.Number,
Witness: b.Witness,
Time: b.Time,
}
return ret
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aiou-official/go-aiou.git
git@gitee.com:aiou-official/go-aiou.git
aiou-official
go-aiou
go-aiou
376a44096468

搜索帮助