Documentation
¶
Index ¶
- type CanceledRoute
- type RoutesState
- type State
- func (rs *State) AvailableBalance() *big.Int
- func (rs *State) CanContinueTransfer() bool
- func (rs *State) CanTransfer() bool
- func (rs *State) Channel() *channel.Channel
- func (rs *State) ClosedBlock() int64
- func (rs *State) HopNode() common.Address
- func (rs *State) RevealTimeout() int
- func (rs *State) SetClosedBlock(blockNumbder int64)
- func (rs *State) SetState(state channeltype.State)
- func (rs *State) SettleTimeout() int
- func (rs *State) State() channeltype.State
- func (rs *State) StateName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoutesState ¶
type RoutesState struct { AvailableRoutes []*State IgnoredRoutes []*State RefundedRoutes []*State CanceledRoutes []*CanceledRoute }
RoutesState is Routing state.
func NewRoutesState ¶
func NewRoutesState(availables []*State) *RoutesState
NewRoutesState create routes state from availabes routes
type State ¶
type State struct { ChannelIdentifier common.Hash //崩溃恢复的时候需要 // Needed when handling crash cases. IsSend bool //用这个 route 来发送还是接收? // whether this route is used to send or receive. Fee *big.Int // how much fee to this channel charge charge . TotalFee *big.Int // how much fee for all path when initiator use this route Path []common.Address // 2019-03消息升级,路由中保存该条路径上所有节点,有序 // contains filtered or unexported fields }
State describes a route state 路由状态我如何收到的或者发送MediatedTransfer
- State : describe a route state
- route state means how does this participant get or send MediatedTransfer.
func (*State) AvailableBalance ¶
AvailableBalance avaialabe balance of this route
func (*State) CanContinueTransfer ¶
CanContinueTransfer can continue on this hop node
func (*State) CanTransfer ¶
CanTransfer can transfer on this hop node
func (*State) ClosedBlock ¶
ClosedBlock return closedBlock of this route channel
func (*State) RevealTimeout ¶
RevealTimeout reveal timeout of this channel
func (*State) SetClosedBlock ¶
SetClosedBlock set closed block ,for test only
func (*State) SettleTimeout ¶
SettleTimeout settle timeout of this channel
Click to show internal directories.
Click to hide internal directories.