https://github.com/chaunsin/block
parse fabric block
https://github.com/chaunsin/block
fabric go golang
Last synced: about 1 month ago
JSON representation
parse fabric block
- Host: GitHub
- URL: https://github.com/chaunsin/block
- Owner: chaunsin
- Created: 2025-03-26T08:01:20.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-27T09:46:36.000Z (about 1 year ago)
- Last Synced: 2025-03-27T10:35:45.037Z (about 1 year ago)
- Topics: fabric, go, golang
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# block
example parse fabric block
# version
- fabric-protos-go-apiv2: v0.3.7
- fabric: v1.4.0-rc1.0.20250318174348-8f08391d840c -> v3.1.0
version problem see: https://github.com/hyperledger/fabric/issues/4107
# example
``` go
package main
import (
"fmt"
"github.com/chaunsin/block"
"github.com/hyperledger/fabric-protos-go-apiv2/common"
)
// Simulate a block.
var exampleBlock *common.Block
blcok, err := block.ParseSampleBlock(exampleBlock)
if err != nil{
panic(err)
}
fmt.Printf("sampleBlock:%+v\n", blcok)
```