Documentation
¶
Index ¶
- Constants
- func ChanStateName(state int) string
- func IsChanStateChangeValid(old, new int) bool
- func OnChannelConfirmSettle(tx *storage.DALTx, args ...interface{}) error
- func OnChannelIntendSettle(tx *storage.DALTx, args ...interface{}) error
- func OnChannelUpdate(cid ctype.CidType, currState int) error
- func OnCondPayRequestSent(tx *storage.DALTx, payID ctype.PayIDType, cid ctype.CidType, directPay bool) (bool, int, error)
- func OnPayEgressCoSignedCanceled(tx *storage.DALTx, payID ctype.PayIDType) error
- func OnPayEgressCoSignedPaid(tx *storage.DALTx, payID ctype.PayIDType) error
- func OnPayEgressDelivered(tx *storage.DALTx, payID ctype.PayIDType) error
- func OnPayEgressNacked(tx *storage.DALTx, payID ctype.PayIDType) error
- func OnPayEgressOneSigCanceled(tx *storage.DALTx, payID ctype.PayIDType, egstate int) error
- func OnPayEgressOneSigPaid(tx *storage.DALTx, payID ctype.PayIDType, egstate int) error
- func OnPayEgressSecretRevealed(tx *storage.DALTx, payID ctype.PayIDType, state int) error
- func OnPayEgressUpdateAfterNack(tx *storage.DALTx, payID ctype.PayIDType) error
- func OnPayIngressCoSignedCanceled(tx *storage.DALTx, payID ctype.PayIDType, state int) error
- func OnPayIngressCoSignedPaid(tx *storage.DALTx, payID ctype.PayIDType, state int) error
- func OnPayIngressRejected(tx *storage.DALTx, payID ctype.PayIDType, state int) error
- func OnPayIngressSecretRevealed(tx *storage.DALTx, payID ctype.PayIDType, state int) error
- func PayStateName(state int) string
Constants ¶
View Source
const ( PscTrustOpened = "TRUST_OPENED" // client waiting for instantiating tcb tx, after tx is mined, // state will move to PscOpen PscInstantiatingTCB = "INSTANTIATING_TCB" PscOpen = "OPENED" PscDispute = "DISPUTING" PscClosed = "CLOSED" )
do NOT modify the string representation of existing states
View Source
const ( PayOneSigPending = "ONESIG_PENDING" PayCoSignedPending = "COSIGNED_PENDING" PayHashLockRevealed = "HASHLOCK_REVEALED" // only valid for pay src or dst PayOneSigPaid = "ONESIG_PAID" PayCoSignedPaid = "COSIGNED_PAID" PayOneSigCanceled = "ONESIG_CANCELED" PayCoSignedCanceled = "COSIGNED_CANCELED" PayOneSigNacked = "PAY_NACKED" // one-sig simplex rejected by the peer_to PayIngressRejected = "INGRESS_REJECTED" // after sending pay settle proof(cancel), dst should record this state )
do NOT modify the string representation of existing states
Variables ¶
This section is empty.
Functions ¶
func ChanStateName ¶
func IsChanStateChangeValid ¶
IsChanStateChangeValid returns true if new state is possible to reach in channel lifecycle also return true if new == old
func OnChannelConfirmSettle ¶
func OnChannelIntendSettle ¶
func OnCondPayRequestSent ¶
func OnCondPayRequestSent( tx *storage.DALTx, payID ctype.PayIDType, cid ctype.CidType, directPay bool) (bool, int, error)
return exist, newstate, err
func OnPayEgressCoSignedPaid ¶
func OnPayEgressDelivered ¶
func OnPayEgressOneSigPaid ¶
func OnPayIngressRejected ¶
OnPayIngressRejected converts the payment status to ingress rejected after sending pay settle proof(cancel).
func PayStateName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.