Skip to content

Commit 7163097

Browse files
committed
Fix bug sign mutiple transactions simulteneously crash if transactions have the same walletID
1 parent f750777 commit 7163097

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/mpc/ecdsa_signing_session.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ func NewSigningSession(
8787
keyinfoStore: keyinfoStore,
8888
topicComposer: &TopicComposer{
8989
ComposeBroadcastTopic: func() string {
90-
return fmt.Sprintf("sign:ecdsa:broadcast:%s", walletID)
90+
return fmt.Sprintf("sign:ecdsa:broadcast:%s:%s", walletID, txID)
9191
},
9292
ComposeDirectTopic: func(nodeID string) string {
93-
return fmt.Sprintf("sign:ecdsa:direct:%s:%s", nodeID, walletID)
93+
return fmt.Sprintf("sign:ecdsa:direct:%s:%s", nodeID, txID)
9494
},
9595
},
9696
composeKey: func(waleltID string) string {

pkg/mpc/eddsa_signing_session.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ func NewEDDSASigningSession(
5757
keyinfoStore: keyinfoStore,
5858
topicComposer: &TopicComposer{
5959
ComposeBroadcastTopic: func() string {
60-
return fmt.Sprintf("sign:eddsa:broadcast:%s", walletID)
60+
return fmt.Sprintf("sign:eddsa:broadcast:%s:%s", walletID, txID)
6161
},
6262
ComposeDirectTopic: func(nodeID string) string {
63-
return fmt.Sprintf("sign:eddsa:direct:%s:%s", nodeID, walletID)
63+
return fmt.Sprintf("sign:eddsa:direct:%s:%s", nodeID, txID)
6464
},
6565
},
6666
composeKey: func(waleltID string) string {

0 commit comments

Comments
 (0)