Documentation
¶
Index ¶
- Constants
- Variables
- func AddAccountChange(changes uint32, change uint32) uint32
- func GetOperationFromString(operation string) uint32
- func GetOperationString(operation uint32) string
- func MergeOperations(operation1, operation2 uint32) uint32
- type ActionType
- type DataTrieChange
- func (*DataTrieChange) Descriptor() ([]byte, []int)
- func (this *DataTrieChange) Equal(that interface{}) bool
- func (m *DataTrieChange) GetKey() []byte
- func (m *DataTrieChange) GetOperation() uint32
- func (m *DataTrieChange) GetType() ActionType
- func (m *DataTrieChange) GetVal() []byte
- func (m *DataTrieChange) GetVersion() uint32
- func (this *DataTrieChange) GoString() string
- func (m *DataTrieChange) Marshal() (dAtA []byte, err error)
- func (m *DataTrieChange) MarshalTo(dAtA []byte) (int, error)
- func (m *DataTrieChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DataTrieChange) ProtoMessage()
- func (m *DataTrieChange) Reset()
- func (m *DataTrieChange) Size() (n int)
- func (this *DataTrieChange) String() string
- func (m *DataTrieChange) Unmarshal(dAtA []byte) error
- func (m *DataTrieChange) XXX_DiscardUnknown()
- func (m *DataTrieChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DataTrieChange) XXX_Merge(src proto.Message)
- func (m *DataTrieChange) XXX_Size() int
- func (m *DataTrieChange) XXX_Unmarshal(b []byte) error
- type DataTrieOperation
- type StateAccess
- func (*StateAccess) Descriptor() ([]byte, []int)
- func (this *StateAccess) Equal(that interface{}) bool
- func (m *StateAccess) GetAccountChanges() uint32
- func (m *StateAccess) GetDataTrieChanges() []*DataTrieChange
- func (m *StateAccess) GetIndex() int32
- func (m *StateAccess) GetMainTrieKey() []byte
- func (m *StateAccess) GetMainTrieVal() []byte
- func (m *StateAccess) GetOperation() uint32
- func (m *StateAccess) GetTxHash() []byte
- func (m *StateAccess) GetType() ActionType
- func (this *StateAccess) GoString() string
- func (m *StateAccess) Marshal() (dAtA []byte, err error)
- func (m *StateAccess) MarshalTo(dAtA []byte) (int, error)
- func (m *StateAccess) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StateAccess) ProtoMessage()
- func (m *StateAccess) Reset()
- func (m *StateAccess) Size() (n int)
- func (this *StateAccess) String() string
- func (m *StateAccess) Unmarshal(dAtA []byte) error
- func (m *StateAccess) XXX_DiscardUnknown()
- func (m *StateAccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StateAccess) XXX_Merge(src proto.Message)
- func (m *StateAccess) XXX_Size() int
- func (m *StateAccess) XXX_Unmarshal(b []byte) error
- type StateAccesses
- func (*StateAccesses) Descriptor() ([]byte, []int)
- func (this *StateAccesses) Equal(that interface{}) bool
- func (m *StateAccesses) GetStateAccess() []*StateAccess
- func (this *StateAccesses) GoString() string
- func (m *StateAccesses) Marshal() (dAtA []byte, err error)
- func (m *StateAccesses) MarshalTo(dAtA []byte) (int, error)
- func (m *StateAccesses) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StateAccesses) ProtoMessage()
- func (m *StateAccesses) Reset()
- func (m *StateAccesses) Size() (n int)
- func (this *StateAccesses) String() string
- func (m *StateAccesses) Unmarshal(dAtA []byte) error
- func (m *StateAccesses) XXX_DiscardUnknown()
- func (m *StateAccesses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StateAccesses) XXX_Merge(src proto.Message)
- func (m *StateAccesses) XXX_Size() int
- func (m *StateAccesses) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( // NoChange is the default value for account changes NoChange = uint32(0) // NonceChanged is the location of the bit that represents the NonceChanged change NonceChanged = uint32(1) // BalanceChanged is the location of the bit that represents the BalanceChanged change BalanceChanged = uint32(2) // CodeHashChanged is the location of the bit that represents the CodeHashChanged change CodeHashChanged = uint32(4) // RootHashChanged is the location of the bit that represents the RootHashChanged change RootHashChanged = uint32(8) // DeveloperRewardChanged is the location of the bit that represents the DeveloperRewardChanged change DeveloperRewardChanged = uint32(16) // OwnerAddressChanged is the location of the bit that represents the OwnerAddressChanged change OwnerAddressChanged = uint32(32) // UserNameChanged is the location of the bit that represents the UserNameChanged change UserNameChanged = uint32(64) // CodeMetadataChanged is the location of the bit that represents the CodeMetadataChanged change CodeMetadataChanged = uint32(128) )
View Source
const ( // NotSet is the default value for state access operation NotSet = uint32(0) // GetCode is the location of the bit that represents the GetCode operation GetCode = uint32(1) // SaveAccount is the location of the bit that represents the SaveAccount operation SaveAccount = uint32(2) // GetAccount is the location of the bit that represents the GetAccount operation GetAccount = uint32(4) // WriteCode is the location of the bit that represents the WriteCode operation WriteCode = uint32(8) // RemoveDataTrie is the location of the bit that represents the RemoveDataTrie operation RemoveDataTrie = uint32(16) // GetDataTrieValue is the location of the bit that represents the GetDataTrieValue operation GetDataTrieValue = uint32(32) )
View Source
const ( // NotSetString is the string representation of the NotSet operation NotSetString = "NotSet" // GetCodeString is the string representation of the GetCode operation GetCodeString = "GetCode" // SaveAccountString is the string representation of the SaveAccount operation SaveAccountString = "SaveAccount" // GetAccountString is the string representation of the GetAccount operation GetAccountString = "GetAccount" // WriteCodeString is the string representation of the WriteCode operation WriteCodeString = "WriteCode" // RemoveDataTrieString is the string representation of the RemoveDataTrie operation RemoveDataTrieString = "RemoveDataTrie" // GetDataTrieValueString is the string representation of the GetDataTrieValue operation GetDataTrieValueString = "GetDataTrieValue" )
Variables ¶
View Source
var ( ErrInvalidLengthStateChange = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStateChange = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupStateChange = fmt.Errorf("proto: unexpected end of group") )
View Source
var ActionType_name = map[int32]string{
0: "Read",
1: "Write",
}
View Source
var ActionType_value = map[string]int32{
"Read": 0,
"Write": 1,
}
Functions ¶
func AddAccountChange ¶
AddAccountChange adds a change to the current changes and returns the updated changes
func GetOperationFromString ¶
GetOperationFromString converts a string representation of an operation to its corresponding uint32 value.
func GetOperationString ¶
GetOperationString converts a uint32 operation to its string representation.
func MergeOperations ¶
MergeOperations combines two uint32 operations using a bitwise OR and returns the resulting value.
Types ¶
type ActionType ¶
type ActionType int32
const ( Read ActionType = 0 Write ActionType = 1 )
func (ActionType) EnumDescriptor ¶
func (ActionType) EnumDescriptor() ([]byte, []int)
func (ActionType) String ¶
func (x ActionType) String() string
type DataTrieChange ¶
type DataTrieChange struct {
Type ActionType `protobuf:"varint,1,opt,name=Type,proto3,enum=proto.ActionType" json:"type"`
Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"key"`
Val []byte `protobuf:"bytes,3,opt,name=Val,proto3" json:"val"`
Version uint32 `protobuf:"varint,4,opt,name=Version,proto3" json:"version"`
Operation uint32 `protobuf:"varint,5,opt,name=Operation,proto3" json:"operation"`
}
func MergeDataTrieChanges ¶
func MergeDataTrieChanges(oldDataTrieChanges, newDataTrieChanges []*DataTrieChange) []*DataTrieChange
MergeDataTrieChanges combines two lists of DataTrieChange items into a single list, merging changes with overlapping keys.
func (*DataTrieChange) Descriptor ¶
func (*DataTrieChange) Descriptor() ([]byte, []int)
func (*DataTrieChange) Equal ¶
func (this *DataTrieChange) Equal(that interface{}) bool
func (*DataTrieChange) GetKey ¶
func (m *DataTrieChange) GetKey() []byte
func (*DataTrieChange) GetOperation ¶
func (m *DataTrieChange) GetOperation() uint32
func (*DataTrieChange) GetType ¶
func (m *DataTrieChange) GetType() ActionType
func (*DataTrieChange) GetVal ¶
func (m *DataTrieChange) GetVal() []byte
func (*DataTrieChange) GetVersion ¶
func (m *DataTrieChange) GetVersion() uint32
func (*DataTrieChange) GoString ¶
func (this *DataTrieChange) GoString() string
func (*DataTrieChange) Marshal ¶
func (m *DataTrieChange) Marshal() (dAtA []byte, err error)
func (*DataTrieChange) MarshalToSizedBuffer ¶
func (m *DataTrieChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DataTrieChange) ProtoMessage ¶
func (*DataTrieChange) ProtoMessage()
func (*DataTrieChange) Reset ¶
func (m *DataTrieChange) Reset()
func (*DataTrieChange) Size ¶
func (m *DataTrieChange) Size() (n int)
func (*DataTrieChange) String ¶
func (this *DataTrieChange) String() string
func (*DataTrieChange) Unmarshal ¶
func (m *DataTrieChange) Unmarshal(dAtA []byte) error
func (*DataTrieChange) XXX_DiscardUnknown ¶
func (m *DataTrieChange) XXX_DiscardUnknown()
func (*DataTrieChange) XXX_Marshal ¶
func (m *DataTrieChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DataTrieChange) XXX_Merge ¶
func (m *DataTrieChange) XXX_Merge(src proto.Message)
func (*DataTrieChange) XXX_Size ¶
func (m *DataTrieChange) XXX_Size() int
func (*DataTrieChange) XXX_Unmarshal ¶
func (m *DataTrieChange) XXX_Unmarshal(b []byte) error
type DataTrieOperation ¶
type DataTrieOperation uint32
DataTrieOperation represents the type for data trie operations
const ( // NotSpecified is the default value for data trie operation NotSpecified DataTrieOperation = 0 // Delete is the value for delete operation on data trie Delete DataTrieOperation = 1 )
type StateAccess ¶
type StateAccess struct {
Type ActionType `protobuf:"varint,1,opt,name=Type,proto3,enum=proto.ActionType" json:"type"`
Index int32 `protobuf:"varint,2,opt,name=Index,proto3" json:"index"`
TxHash []byte `protobuf:"bytes,3,opt,name=TxHash,proto3" json:"txHash"`
MainTrieKey []byte `protobuf:"bytes,4,opt,name=MainTrieKey,proto3" json:"mainTrieKey"`
MainTrieVal []byte `protobuf:"bytes,5,opt,name=MainTrieVal,proto3" json:"mainTrieVal"`
Operation uint32 `protobuf:"varint,6,opt,name=Operation,proto3" json:"operation"`
DataTrieChanges []*DataTrieChange `protobuf:"bytes,7,rep,name=DataTrieChanges,proto3" json:"dataTrieChanges,omitempty"`
AccountChanges uint32 `protobuf:"varint,8,opt,name=AccountChanges,proto3" json:"accountChanges"`
}
func (*StateAccess) Descriptor ¶
func (*StateAccess) Descriptor() ([]byte, []int)
func (*StateAccess) Equal ¶
func (this *StateAccess) Equal(that interface{}) bool
func (*StateAccess) GetAccountChanges ¶
func (m *StateAccess) GetAccountChanges() uint32
func (*StateAccess) GetDataTrieChanges ¶
func (m *StateAccess) GetDataTrieChanges() []*DataTrieChange
func (*StateAccess) GetIndex ¶
func (m *StateAccess) GetIndex() int32
func (*StateAccess) GetMainTrieKey ¶
func (m *StateAccess) GetMainTrieKey() []byte
func (*StateAccess) GetMainTrieVal ¶
func (m *StateAccess) GetMainTrieVal() []byte
func (*StateAccess) GetOperation ¶
func (m *StateAccess) GetOperation() uint32
func (*StateAccess) GetTxHash ¶
func (m *StateAccess) GetTxHash() []byte
func (*StateAccess) GetType ¶
func (m *StateAccess) GetType() ActionType
func (*StateAccess) GoString ¶
func (this *StateAccess) GoString() string
func (*StateAccess) Marshal ¶
func (m *StateAccess) Marshal() (dAtA []byte, err error)
func (*StateAccess) MarshalToSizedBuffer ¶
func (m *StateAccess) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StateAccess) ProtoMessage ¶
func (*StateAccess) ProtoMessage()
func (*StateAccess) Reset ¶
func (m *StateAccess) Reset()
func (*StateAccess) Size ¶
func (m *StateAccess) Size() (n int)
func (*StateAccess) String ¶
func (this *StateAccess) String() string
func (*StateAccess) Unmarshal ¶
func (m *StateAccess) Unmarshal(dAtA []byte) error
func (*StateAccess) XXX_DiscardUnknown ¶
func (m *StateAccess) XXX_DiscardUnknown()
func (*StateAccess) XXX_Marshal ¶
func (m *StateAccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StateAccess) XXX_Merge ¶
func (m *StateAccess) XXX_Merge(src proto.Message)
func (*StateAccess) XXX_Size ¶
func (m *StateAccess) XXX_Size() int
func (*StateAccess) XXX_Unmarshal ¶
func (m *StateAccess) XXX_Unmarshal(b []byte) error
type StateAccesses ¶
type StateAccesses struct {
StateAccess []*StateAccess `protobuf:"bytes,1,rep,name=StateAccess,proto3" json:"stateAccess"`
}
func (*StateAccesses) Descriptor ¶
func (*StateAccesses) Descriptor() ([]byte, []int)
func (*StateAccesses) Equal ¶
func (this *StateAccesses) Equal(that interface{}) bool
func (*StateAccesses) GetStateAccess ¶
func (m *StateAccesses) GetStateAccess() []*StateAccess
func (*StateAccesses) GoString ¶
func (this *StateAccesses) GoString() string
func (*StateAccesses) Marshal ¶
func (m *StateAccesses) Marshal() (dAtA []byte, err error)
func (*StateAccesses) MarshalToSizedBuffer ¶
func (m *StateAccesses) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StateAccesses) ProtoMessage ¶
func (*StateAccesses) ProtoMessage()
func (*StateAccesses) Reset ¶
func (m *StateAccesses) Reset()
func (*StateAccesses) Size ¶
func (m *StateAccesses) Size() (n int)
func (*StateAccesses) String ¶
func (this *StateAccesses) String() string
func (*StateAccesses) Unmarshal ¶
func (m *StateAccesses) Unmarshal(dAtA []byte) error
func (*StateAccesses) XXX_DiscardUnknown ¶
func (m *StateAccesses) XXX_DiscardUnknown()
func (*StateAccesses) XXX_Marshal ¶
func (m *StateAccesses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StateAccesses) XXX_Merge ¶
func (m *StateAccesses) XXX_Merge(src proto.Message)
func (*StateAccesses) XXX_Size ¶
func (m *StateAccesses) XXX_Size() int
func (*StateAccesses) XXX_Unmarshal ¶
func (m *StateAccesses) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.