-
Notifications
You must be signed in to change notification settings - Fork 4
/
sys_types.go
58 lines (47 loc) · 1.01 KB
/
sys_types.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
package types
import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
"github.com/ipfs-force-community/go-fvm-sdk/sdk/ferrors"
)
const (
/// DagCBOR should be used for all IPLD-CBOR data where CIDs need to be traversable.
DAGCBOR uint64 = 0x71
CBOR uint64 = 0x51
IPLDRAW uint64 = 0x55
)
type Codec = uint64
// NoDataBlockID specify noblock in params and return
const NoDataBlockID uint32 = 0
type BlockID = uint32
func ValidateConsensusFaultType(c runtime.ConsensusFaultType) bool {
return 0 <= c && c <= 3
}
type IpldOpen struct {
Codec Codec
ID uint32
Size uint32
}
type IpldStat struct {
Codec Codec
Size uint32
}
type ResolveAddress struct {
Resolved int32
Value uint64
}
type SendResult struct {
ExitCode ferrors.ExitCode
ReturnID BlockID
ReturnCodec uint64
ReturnSize uint32
}
type VerifyConsensusFault struct {
Epoch int64
Target abi.ActorID
Fault uint32
}
type ParamsRaw struct {
Codec Codec
Raw []byte
}