Documentation ¶
Index ¶
- func CheckIfSolnIsValid(channelID, soln [32]byte, tos TickOrStop) (tf bool)
- func IsAddressContract(h *EHub, data []byte)
- func IsCatchUpTopic(topic string) (tf bool)
- func OpenChannelSim(inputs []string, value uint64) (nyup NYUP)
- func RegisterNodeIDSim(inputs []string, value uint64) (nyup NYUP)
- func RunScannerHubTestTriggersServer(e *EHub)
- func TxShouldBeValidSansAcctBalance(methodSig, msgSender string, inputs []string, value uint64) (nyup NYUP)
- func UnregisterNodeIDSim(inputs []string, msgSender string, value uint64) (nyup NYUP)
- func UpdateNodeIDSim(inputs []string, msgSender string, value uint64) (nyup NYUP)
- type BNSH
- type BlockNumber2LogData
- type BlockNumberScannerHandler
- type ChannelID2Info
- func (c *ChannelID2Info) IsChannelViable(channelID string, tos TickOrStop) (nyup NYUP)
- func (c *ChannelID2Info) TouchChannel(channelID string, nyup NYUP, up *encodings.UnpackedTx)
- func (c *ChannelID2Info) TouchChannelData(up *encodings.UnpackedTx)
- func (c *ChannelID2Info) TouchChannelTick(cd *ChannelData, numTicks uint64)
- type ChannelID2Soln
- type ChannelInfo
- type DataType
- type EHub
- func (h *EHub) AddData(method, blockNumber string, up *encodings.UnpackedTx)
- func (h *EHub) CatchUp() (er error)
- func (h *EHub) CheckPendingTxsForOverextension(address string, balance, txValue uint64) (ok bool)
- func (h *EHub) Init(topics []string, lookback uint64) (er error)
- func (h *EHub) InitChannels(lookback uint64, w *sync.WaitGroup)
- func (h *EHub) InitGlobalParameters(w *sync.WaitGroup) <-chan error
- func (h *EHub) InitSolns(lookback uint64, w *sync.WaitGroup)
- func (e *EHub) InitTestTriggers(w *sync.WaitGroup)
- func (h *EHub) InitializeBlockNumberScanner(w *sync.WaitGroup)
- func (h *EHub) InitializeProfileMgr(lookback uint64, w *sync.WaitGroup)
- func (h *EHub) InitializeTxMgr(w *sync.WaitGroup)
- func (h *EHub) Listen() (er error)
- func (h *EHub) SolnIsSubmitted(channelID, soln string) (tf bool)
- func (h *EHub) TopicHashes() []string
- func (h *EHub) Topics() []string
- func (h *EHub) UpdateCache() (er error)
- type EScanner
- func (s *EScanner) CatchUp() (er error)
- func (s *EScanner) DumpData() (ret [][]byte)
- func (s *EScanner) Init(topic string, lookback uint64) (er error)
- func (s *EScanner) Listen() (er error)
- func (s *EScanner) Process(data interface{}, dt DataType) (er error)
- func (s *EScanner) Topic() string
- func (s *EScanner) TopicHash() string
- func (s *EScanner) UpdateCache() (er error)
- type Hub
- type LH
- type LSParams
- type LSResult
- type ListenerHandler
- type LogData
- type LogsSubscription
- type NPTP
- type NewHeadsParams
- type NewHeadsResponse
- type NewHeadsResult
- type NewPendingTransactionsResponse
- type PTH
- type PendingTransactionsHandler
- type Scanner
- type Soln
- type Topic2Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfSolnIsValid ¶
func IsAddressContract ¶
func IsCatchUpTopic ¶
func OpenChannelSim ¶
func RegisterNodeIDSim ¶
func RunScannerHubTestTriggersServer ¶
func RunScannerHubTestTriggersServer(e *EHub)
func UnregisterNodeIDSim ¶
func UpdateNodeIDSim ¶
Types ¶
type BNSH ¶
type BNSH BlockNumberScannerHandler
type BlockNumber2LogData ¶
type BlockNumber2LogData struct { sync.RWMutex M map[string]*LogData BlocksDLL *DoublyLinkedList // for efficient cleanup }
func (*BlockNumber2LogData) AddData ¶
func (b *BlockNumber2LogData) AddData(blockNumber string, logData []byte)
func (*BlockNumber2LogData) DeleteDataUpTo ¶
func (b *BlockNumber2LogData) DeleteDataUpTo(nAgo uint64)
type ChannelID2Info ¶
type ChannelID2Info struct { sync.RWMutex M map[string]*ChannelInfo SHub *EHub // parent // contains filtered or unexported fields }
func (*ChannelID2Info) IsChannelViable ¶
func (c *ChannelID2Info) IsChannelViable(channelID string, tos TickOrStop) (nyup NYUP)
func (*ChannelID2Info) TouchChannel ¶
func (c *ChannelID2Info) TouchChannel(channelID string, nyup NYUP, up *encodings.UnpackedTx)
func (*ChannelID2Info) TouchChannelData ¶
func (c *ChannelID2Info) TouchChannelData(up *encodings.UnpackedTx)
func (*ChannelID2Info) TouchChannelTick ¶
func (c *ChannelID2Info) TouchChannelTick(cd *ChannelData, numTicks uint64)
type ChannelID2Soln ¶
type ChannelID2Soln struct { sync.RWMutex M map[string]*Soln SHub *EHub // parent // contains filtered or unexported fields }
func (*ChannelID2Soln) AddData ¶
func (s *ChannelID2Soln) AddData(is *RedeemSolutionInput) (numSolns uint64)
func (*ChannelID2Soln) Dump ¶
func (s *ChannelID2Soln) Dump() (pairs []*RedeemSolutionInput)
func (*ChannelID2Soln) SolnIsSubmitted ¶
func (s *ChannelID2Soln) SolnIsSubmitted(channelID, soln string) (tf bool)
func (*ChannelID2Soln) UpdateCache ¶
func (s *ChannelID2Soln) UpdateCache()
type ChannelInfo ¶
type ChannelInfo struct { sync.RWMutex Address string IsOpenTick NYUP IsOpenStop NYUP Value uint64 Gas uint64 GasPrice uint64 Ticks uint64 }
func (*ChannelInfo) IsOpen ¶
func (c *ChannelInfo) IsOpen(tos TickOrStop) (r NYUP)
func (*ChannelInfo) RemainingTOS ¶
func (c *ChannelInfo) RemainingTOS(tos TickOrStop) (r NYUP)
func (*ChannelInfo) SetIsOpen ¶
func (c *ChannelInfo) SetIsOpen(nyup NYUP, tos TickOrStop)
func (*ChannelInfo) SetIsOpenByPrecedence ¶
func (c *ChannelInfo) SetIsOpenByPrecedence(nyup NYUP, tos TickOrStop) (r NYUP)
type EHub ¶
type EHub struct { BlockNumber *state.BlockNumber // ptr to the global block number TxMgr *state.TxMgr ProfileMgr *state.ProfileMgr Scanners *Topic2Scanner Solns *ChannelID2Soln Channels *ChannelID2Info // contains filtered or unexported fields }
var G_Hub *EHub
func NewDefaultScannerHub ¶
func (*EHub) CheckPendingTxsForOverextension ¶
func (*EHub) InitGlobalParameters ¶
func (*EHub) InitTestTriggers ¶
func (*EHub) InitializeBlockNumberScanner ¶
Initializes custom scanner that keeps global BlockNumber updated
func (*EHub) InitializeProfileMgr ¶
func (*EHub) InitializeTxMgr ¶
func (*EHub) SolnIsSubmitted ¶
func (*EHub) UpdateCache ¶
type EScanner ¶
type EScanner struct { SHub Hub // parent BlkN2LogData *BlockNumber2LogData // contains filtered or unexported fields }
func (*EScanner) CatchUp ¶
first routine called. scans recent logs for nodeIDs and sends to processor
func (*EScanner) UpdateCache ¶
type Hub ¶
type Hub interface { Init(topics []string, lookback uint64) error // TODO CONSOLIDATE INITIALIZERS InitializeBlockNumberScanner(w *sync.WaitGroup) InitializeTxMgr(w *sync.WaitGroup) InitializeProfileMgr(lookback uint64, w *sync.WaitGroup) InitGlobalParameters(w *sync.WaitGroup) <-chan error InitChannels(lookback uint64, w *sync.WaitGroup) InitSolns(lookback uint64, w *sync.WaitGroup) InitTestTriggers(w *sync.WaitGroup) Topics() []string TopicHashes() []string CatchUp() error Listen() error UpdateCache() error // this is to prune irrelevant entries AddData(method, blockNumber string, up *encodings.UnpackedTx) SolnIsSubmitted(channelID, soln string) (tf bool) }
type LH ¶
type LH ListenerHandler
type ListenerHandler ¶
type ListenerHandler struct{}
type LogsSubscription ¶
type LogsSubscription struct {
Params LSParams `json:"params"`
}
type NewHeadsParams ¶
type NewHeadsParams struct {
Result NewHeadsResult `json:"result"`
}
type NewHeadsResponse ¶
type NewHeadsResponse struct {
Params NewHeadsParams `json:"params"`
}
type NewHeadsResult ¶
type NewPendingTransactionsResponse ¶
type NewPendingTransactionsResponse struct {
Params NPTP `json:"params"`
}
type PTH ¶
type PTH PendingTransactionsHandler
type PendingTransactionsHandler ¶
type PendingTransactionsHandler struct{}
Click to show internal directories.
Click to hide internal directories.