-
Notifications
You must be signed in to change notification settings - Fork 199
/
nilPendingMiniblocks.go
40 lines (31 loc) · 1.24 KB
/
nilPendingMiniblocks.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
37
38
39
40
package pendingMb
import (
"github.com/ElrondNetwork/elrond-go-core/data"
"github.com/ElrondNetwork/elrond-go/process"
)
var _ process.PendingMiniBlocksHandler = (*nilPendingMiniBlocks)(nil)
type nilPendingMiniBlocks struct {
}
// NewNilPendingMiniBlocks will create a new pendingMiniBlocks object
func NewNilPendingMiniBlocks() (*nilPendingMiniBlocks, error) {
return &nilPendingMiniBlocks{}, nil
}
// AddProcessedHeader will add in pending list all miniblocks hashes from a given metablock
func (p *nilPendingMiniBlocks) AddProcessedHeader(_ data.HeaderHandler) error {
return nil
}
// RevertHeader will remove from pending list all miniblocks hashes from a given metablock
func (p *nilPendingMiniBlocks) RevertHeader(_ data.HeaderHandler) error {
return nil
}
// GetPendingMiniBlocks will return the pending miniblocks hashes for a given shard
func (p *nilPendingMiniBlocks) GetPendingMiniBlocks(_ uint32) [][]byte {
return make([][]byte, 0)
}
// SetPendingMiniBlocks will set the pending miniblocks hashes for a given shard
func (p *nilPendingMiniBlocks) SetPendingMiniBlocks(_ uint32, _ [][]byte) {
}
// IsInterfaceNil returns true if there is no value under the interface
func (p *nilPendingMiniBlocks) IsInterfaceNil() bool {
return p == nil
}