mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use &self for handle_message and sync_block in Tributary
They used &mut self to prevent execution at the same time. This uses a lock
over the channel to achieve the same security, without requiring a lock over
the entire tributary.
This fixes post-provided Provided transactions. sync_block waited for the TX to
be provided, yet it never would as sync_block held a mutable reference over the
entire Tributary, preventing any other read/write operations of any scope.
A timeout increased (bc2f23f72b) due to this bug
not being identified has been decreased back, thankfully.
Also shims in basic support for Completed, which was the WIP before this bug
was identified.
This commit is contained in:
@@ -243,6 +243,9 @@ pub enum Transaction {
|
||||
|
||||
SignPreprocess(SignData),
|
||||
SignShare(SignData),
|
||||
// TODO: We can't make this an Unsigned as we need to prevent spam, which requires a max of 1
|
||||
// claim per sender
|
||||
// Can we de-duplicate across senders though, if they claim the same hash completes?
|
||||
SignCompleted([u8; 32], Vec<u8>, Signed),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user