-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ban doublespenders #11372
Ban doublespenders #11372
Conversation
a59da80
to
beff176
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK on RegTest. Round is ended once I double spend my CJing coin & coin is punished for it. Code LGTM.
b189c3a
to
22e7f11
Compare
public void BanDoubleSpenders(object? sender, Transaction tx) | ||
{ | ||
// Detect and punish double spending coins | ||
var disrupters = Arena.Rounds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lontivero
This is dangerous. Arena and rounds are not designed to be touched from outside asynchronously. There is a read operation here and later you also close the round.
The only place where we are touching rounds is Arena.ActionAsync and locking AsyncLock.
You need to find a solution how to integrate this into Arena.
This PR is for banning coins that were spent after being registered for participation in a coinjoin.