func ShardBlockBodyFromProto(sb *pb.ShardBlockBody) (*ShardBlockBody, error) {
	txs := make([]ShardTransaction, len(sb.Transactions))

	for i := range txs {
		tx, err := ShardTransactionFromProto(sb.Transactions[i])
		if err != nil {
			return nil, err
		}

		txs[i] = *tx
	}

	return &ShardBlockBody{
		Transactions: txs,
	}, nil
}
// ShardBlockBodyFromProto converts a protobuf representation of shard block body to a shard block body.
ShardBlockBodyFromProto converts a protobuf representation of shard block body to a shard block body.
// ShardBlockBodyFromProto converts a protobuf representation of shard block body to a shard block body .
func ShardBlockBodyFromProto(sb *pb.ShardBlockBody) (*ShardBlockBody, error) {
	txs := make([]ShardTransaction, len(sb.Transactions))
	for i := range txs {
		tx, err := ShardTransactionFromProto(sb.Transactions[i])
		if err != nil {
			return nil, err
		}
		txs[i] = *tx
	}
	return &ShardBlockBody{
		Transactions: txs,
	}, nil
}
func ShardBlockBodyFromProto ( sb * pb . ShardBlockBody ) ( * ShardBlockBody , error ) { txs := make ( [ ] ShardTransaction , len ( sb . Transactions ) ) for i := range txs { tx , err := ShardTransactionFromProto ( sb . Transactions [ i ] ) if err != nil { return nil , err } txs [ i ] = * tx } return & ShardBlockBody { Transactions : txs , } , nil }
ShardBlockBodyFromProto converts a protobuf representation of shard block body to a shard block body.
ShardBlockBodyFromProto converts a protobuf representation of shard block body to a shard block body .