Move SignCompleted to Unsigned to cause de-duplication amongst honest validators

This commit is contained in:
Luke Parker
2023-08-31 23:39:36 -04:00
parent 9b7cb688ed
commit 5113ab9ec4
6 changed files with 97 additions and 26 deletions

View File

@@ -585,8 +585,8 @@ pub async fn handle_application_tx<
None => {}
}
}
Transaction::SignCompleted(id, tx, signed) => {
// TODO: Confirm this is a valid ID
Transaction::SignCompleted { plan, tx_hash, .. } => {
// TODO: Confirm this is a valid plan ID
// TODO: Confirm this signer hasn't prior published a completion
let Some(key_pair) = TributaryDb::<D>::key_pair(txn, spec.set()) else { todo!() };
processors
@@ -594,8 +594,8 @@ pub async fn handle_application_tx<
spec.set().network,
CoordinatorMessage::Sign(sign::CoordinatorMessage::Completed {
key: key_pair.1.to_vec(),
id,
tx,
id: plan,
tx: tx_hash,
}),
)
.await;