# Functions
AddChannel add channel to db, 必须将相应的participant 信息清空.
AddTokeNetwork 链上新建了一个tokennetwork.
CloseChannel because of channel closed event.
CloseDB release connection.
DeleteAccountAllFeeRate 删除账户所有收费记录.
GetAccountFeePolicy 获取某个账户的缺省收费,新创建的通道都会按照此缺省设置进行.
GetAccountTokenFee 获取账户针对某个token的缺省收费设置.
GetAllNodes get all matrix account.
GetAllTokenChannels get all channels of this `token`.
GetAllTokenNetworks 获取目前已知的tokenNetwork.
GetChannel from db.
GetChannelFeeRate get channel's fee rate.
GetLatestBlockNumber 获取已经处理的最新块数.
GetObserverKey get or create a key from db.
NewOrUpdateNodeOnline update node's status.
NewOrUpdateNodeStatus update node's online info.
SettleChannel because of channel settled event.
SetUpDB init db.
SetupTestDB for test only.
UpdateAccountDefaultFeePolicy 设置某个账户的缺省收费,新创建的通道都会按照此缺省设置进行.
UpdateAccountTokenFee 更新用户针对某个token的缺省收费设置.
UpdateBlockNumber 更新最新的已经处理过的块数.
UpdateChannelBalanceProof update balance proof.
UpdateChannelDeposit 链上发生了deposit事件,需要更新信息.
UpdateChannelFeeRate update channel's fee rate.
WithDrawChannel because of withdraw event.
XMPPIsAddrSubed return true when `addr` already subscirbed.
XMPPMarkAddrSubed mark `addr` subscribed.
XMPPUnMarkAddr mark `addr` has been unsubscribed.
# Constants
ChannelStatusClosed 通道状态关闭.
ChannelStatusOpen 通道状态打开.
ChannelStatusSettled 通道结算状态.
FeePolicyCombined 以上两种方式的组合.
FeePolicyConstant 每笔交易,不论金额,固定收费.
FeePolicyPercent 每笔交易固定收取一定比例的费用.
# Structs
AccountFee 账户的缺省收费.
AccountTokenFee 某个账户针对某个Token的缺省收费.
BalanceProof is the json request for BalanceProof.
Channel Channel基本信息.
ChannelParticipantFee 存储通道一方的收费信息
*/.
ChannelParticipantInfo 通道中的一方需要存储的交易信息
由于数据库存储限制,
*/.
Fee 为了使用方便定义.
NodeStatus photon account status.
SetAllFeeRateRequest is json request for all fee rate.
SetFeeRateRequest is the json request for setChannelRate.
SettledChannel 在数据库中存储已经结算的通道,为了以后使用.
TokenFee 针对某种token 的缺省收费,暂不启用.