forked from hyperledger/fabric-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fblockwrapper.go
executable file
·36 lines (28 loc) · 907 Bytes
/
fblockwrapper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package mocks
import (
pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"
)
// FilteredBlockWrapper wraps the FilteredBlock and conforms to the Block interface
type FilteredBlockWrapper struct {
block *pb.FilteredBlock
}
// NewFilteredBlockWrapper returns a new Filtered Block wrapper
func NewFilteredBlockWrapper(block *pb.FilteredBlock) *FilteredBlockWrapper {
return &FilteredBlockWrapper{block: block}
}
// Block returns the filtered block
func (w *FilteredBlockWrapper) Block() *pb.FilteredBlock {
return w.block
}
// Number returns the block number
func (w *FilteredBlockWrapper) Number() uint64 {
return w.block.Number
}
// SetNumber sets the block number
func (w *FilteredBlockWrapper) SetNumber(number uint64) {
w.block.Number = number
}