Documentation ¶
Index ¶
- func NewAtArgumentParser() (process.ArgumentsParser, error)
- func NewSmartContractProcessor(vm vmcommon.VMExecutionHandler, argsParser process.ArgumentsParser, ...) (*scProcessor, error)
- type InterceptedSmartContractResult
- func (inScr *InterceptedSmartContractResult) Hash() []byte
- func (inScr *InterceptedSmartContractResult) IsAddressedToOtherShards() bool
- func (inScr *InterceptedSmartContractResult) RcvShard() uint32
- func (inScr *InterceptedSmartContractResult) SmartContractResult() *smartContractResult.SmartContractResult
- func (inScr *InterceptedSmartContractResult) SndShard() uint32
- type ScrInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAtArgumentParser ¶ added in v1.0.3
func NewAtArgumentParser() (process.ArgumentsParser, error)
func NewSmartContractProcessor ¶
func NewSmartContractProcessor( vm vmcommon.VMExecutionHandler, argsParser process.ArgumentsParser, hasher hashing.Hasher, marshalizer marshal.Marshalizer, accountsDB state.AccountsAdapter, tempAccounts process.TemporaryAccountsHandler, adrConv state.AddressConverter, coordinator sharding.Coordinator, ) (*scProcessor, error)
NewSmartContractProcessor create a smart contract processor creates and interprets VM data
Types ¶
type InterceptedSmartContractResult ¶ added in v1.0.3
type InterceptedSmartContractResult struct {
// contains filtered or unexported fields
}
InterceptedSmartContractResult holds and manages a transaction based struct with extended functionality
func NewInterceptedSmartContractResult ¶ added in v1.0.3
func NewInterceptedSmartContractResult( scrBuff []byte, marshalizer marshal.Marshalizer, hasher hashing.Hasher, addrConv state.AddressConverter, coordinator sharding.Coordinator, ) (*InterceptedSmartContractResult, error)
NewInterceptedSmartContractResult returns a new instance of InterceptedSmartContractResult
func (*InterceptedSmartContractResult) Hash ¶ added in v1.0.3
func (inScr *InterceptedSmartContractResult) Hash() []byte
Hash gets the hash of this transaction
func (*InterceptedSmartContractResult) IsAddressedToOtherShards ¶ added in v1.0.3
func (inScr *InterceptedSmartContractResult) IsAddressedToOtherShards() bool
IsAddressedToOtherShards returns true if this transaction is not meant to be processed by the node from this shard
func (*InterceptedSmartContractResult) RcvShard ¶ added in v1.0.3
func (inScr *InterceptedSmartContractResult) RcvShard() uint32
RcvShard returns the receiver shard
func (*InterceptedSmartContractResult) SmartContractResult ¶ added in v1.0.3
func (inScr *InterceptedSmartContractResult) SmartContractResult() *smartContractResult.SmartContractResult
SmartContractResult returns the transaction pointer that actually holds the data
func (*InterceptedSmartContractResult) SndShard ¶ added in v1.0.3
func (inScr *InterceptedSmartContractResult) SndShard() uint32
SndShard returns the sender shard
type ScrInterceptor ¶ added in v1.0.3
type ScrInterceptor struct {
// contains filtered or unexported fields
}
ScrInterceptor is used for intercepting transaction and storing them into a datapool
func NewScrInterceptor ¶ added in v1.0.3
func NewScrInterceptor( marshalizer marshal.Marshalizer, scrPool dataRetriever.ShardedDataCacherNotifier, scrStorer storage.Storer, addrConverter state.AddressConverter, hasher hashing.Hasher, shardCoordinator sharding.Coordinator, ) (*ScrInterceptor, error)
NewScrInterceptor hooks a new interceptor for transactions
func (*ScrInterceptor) ProcessReceivedMessage ¶ added in v1.0.3
func (scri *ScrInterceptor) ProcessReceivedMessage(message p2p.MessageP2P) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to)
func (*ScrInterceptor) SetBroadcastCallback ¶ added in v1.0.3
func (scri *ScrInterceptor) SetBroadcastCallback(callback func(buffToSend []byte))
SetBroadcastCallback sets the callback method to send filtered out message