/
outportBlock.go
executable file
·58 lines (47 loc) · 1.6 KB
/
outportBlock.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//go:generate protoc -I=. -I=$GOPATH/src/github.com/ThotaGopichandThota/gn-core/data/block -I=$GOPATH/src -I=$GOPATH/src/github.com/multiversx/protobuf/protobuf --gogoslick_out=$GOPATH/src outportBlock.proto
package outport
import (
"github.com/ThotaGopichandThota/gn-core/data"
"github.com/ThotaGopichandThota/gn-core/data/block"
)
// OutportBlockWithHeader will extend the OutportBlock structure
type OutportBlockWithHeader struct {
*OutportBlock
Header data.HeaderHandler
}
// HeaderDataWithBody holds header and body data
type HeaderDataWithBody struct {
Body data.BodyHandler
Header data.HeaderHandler
IntraShardMiniBlocks []*block.MiniBlock
HeaderHash []byte
}
// OutportBlockWithHeaderAndBody is a wrapper for OutportBlock used for outport handler
type OutportBlockWithHeaderAndBody struct {
*OutportBlock
HeaderDataWithBody *HeaderDataWithBody
}
// SetExecutionOrder sets execution order
func (t *TxInfo) SetExecutionOrder(order uint32) {
t.ExecutionOrder = order
}
// GetTxHandler returns tx handler
func (t *TxInfo) GetTxHandler() data.TransactionHandler {
return t.Transaction
}
// SetExecutionOrder sets execution order
func (s *SCRInfo) SetExecutionOrder(order uint32) {
s.ExecutionOrder = order
}
// GetTxHandler returns tx handler
func (s *SCRInfo) GetTxHandler() data.TransactionHandler {
return s.SmartContractResult
}
// SetExecutionOrder sets execution order
func (r *RewardInfo) SetExecutionOrder(order uint32) {
r.ExecutionOrder = order
}
// GetTxHandler returns tx handler
func (r *RewardInfo) GetTxHandler() data.TransactionHandler {
return r.Reward
}