mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Correct processor flow to have the coordinator decide signing set/re-attempts
The signing set should be the first group to submit preprocesses to Tributary. Re-attempts shouldn't be once every 30s, yet n blocks since the last relevant message. Removes the use of an async task/channel in the signer (and Substrate signer). Also removes the need to be able to get the time from a coin's block, which was a fragile system marked with a TODO already.
This commit is contained in:
@@ -31,13 +31,11 @@ pub async fn test_wallet<C: Coin>(coin: C) {
|
||||
|
||||
let block = coin.test_send(C::address(key)).await;
|
||||
let block_id = block.id();
|
||||
let block_time = block.time();
|
||||
|
||||
match timeout(Duration::from_secs(30), scanner.events.recv()).await.unwrap().unwrap() {
|
||||
ScannerEvent::Block { key: this_key, block, time, batch, outputs } => {
|
||||
ScannerEvent::Block { key: this_key, block, batch, outputs } => {
|
||||
assert_eq!(this_key, key);
|
||||
assert_eq!(block, block_id);
|
||||
assert_eq!(time, block_time);
|
||||
assert_eq!(batch, 0);
|
||||
assert_eq!(outputs.len(), 1);
|
||||
(block_id, outputs)
|
||||
@@ -104,10 +102,9 @@ pub async fn test_wallet<C: Coin>(coin: C) {
|
||||
}
|
||||
|
||||
match timeout(Duration::from_secs(30), scanner.events.recv()).await.unwrap().unwrap() {
|
||||
ScannerEvent::Block { key: this_key, block: block_id, time, batch, outputs: these_outputs } => {
|
||||
ScannerEvent::Block { key: this_key, block: block_id, batch, outputs: these_outputs } => {
|
||||
assert_eq!(this_key, key);
|
||||
assert_eq!(block_id, block.id());
|
||||
assert_eq!(time, block.time());
|
||||
assert_eq!(batch, 1);
|
||||
assert_eq!(these_outputs, outputs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user