@@ -443,7 +443,7 @@ func (p *ChainPorter) storeProofs(sendPkg *sendPackage) error {
443443 log .Debugf ("Not updating proofs as there are no active " +
444444 "transfers" )
445445
446- sendPkg .SendState = SendStateReceiverProofTransfer
446+ sendPkg .SendState = SendStateTransferProofs
447447 return nil
448448 }
449449
@@ -532,7 +532,7 @@ func (p *ChainPorter) storeProofs(sendPkg *sendPackage) error {
532532 }
533533 }
534534
535- sendPkg .SendState = SendStateReceiverProofTransfer
535+ sendPkg .SendState = SendStateTransferProofs
536536 return nil
537537}
538538
@@ -1031,16 +1031,16 @@ func (p *ChainPorter) stateStep(currentPkg sendPackage) (*sendPackage, error) {
10311031 "package: %w" , err )
10321032 }
10331033
1034- currentPkg .SendState = SendStateLogCommit
1034+ currentPkg .SendState = SendStateStorePreBroadcast
10351035
10361036 return & currentPkg , nil
10371037
1038- // At this state, we have a final PSBT transaction which is fully
1039- // signed. We'll write this to disk ( the point of no return), then
1040- // broadcast this to the network.
1041- case SendStateLogCommit :
1042- // Before we can broadcast , we want to find out the current
1043- // height to pass as a height hint.
1038+ // In this state, the parcel state is stored before the fully signed
1039+ // transaction is broadcast to the mempool.
1040+ case SendStateStorePreBroadcast :
1041+ // We won't broadcast in this state, but in preparation for
1042+ // broadcasting , we will find out the current height to use as
1043+ // a height hint.
10441044 ctx , cancel := p .WithCtxQuit ()
10451045 defer cancel ()
10461046 currentHeight , err := p .cfg .ChainBridge .CurrentHeight (ctx )
@@ -1164,8 +1164,8 @@ func (p *ChainPorter) stateStep(currentPkg sendPackage) (*sendPackage, error) {
11641164
11651165 // At this point, the transfer transaction is confirmed on-chain, and
11661166 // we've stored the sender and receiver proofs in the proof archive.
1167- // We'll now attempt to transfer the receiver proof to the receiver.
1168- case SendStateReceiverProofTransfer :
1167+ // We'll now attempt to transfer one or more proofs to the receiver(s) .
1168+ case SendStateTransferProofs :
11691169 // We'll set the package state to complete early here so the
11701170 // main loop breaks out. We'll continue to attempt proof
11711171 // deliver in the background.
@@ -1181,7 +1181,7 @@ func (p *ChainPorter) stateStep(currentPkg sendPackage) (*sendPackage, error) {
11811181 "proof: %v" , err )
11821182
11831183 p .publishSubscriberEvent (newAssetSendErrorEvent (
1184- err , SendStateReceiverProofTransfer ,
1184+ err , SendStateTransferProofs ,
11851185 currentPkg ,
11861186 ))
11871187 }
0 commit comments