Remove final references to scale in coordinator/processor

Slight tweaks to processor
This commit is contained in:
Luke Parker
2025-09-02 02:41:20 -04:00
parent ada94e8c5d
commit 5736b87b57
10 changed files with 16 additions and 95 deletions

View File

@@ -4,7 +4,6 @@
use std::collections::HashMap;
use scale::{Encode, Decode};
use borsh::{BorshSerialize, BorshDeserialize};
use dkg::Participant;
@@ -178,14 +177,13 @@ impl Keys {
signature_participants,
signature,
);
_public_db::Keys::set(txn, set.network, &(set.session, tx.encode()));
_public_db::Keys::set(txn, set.network, &(set.session, tx));
}
pub(crate) fn take(
txn: &mut impl DbTxn,
network: ExternalNetworkId,
) -> Option<(Session, Transaction)> {
let (session, tx) = _public_db::Keys::take(txn, network)?;
Some((session, <_>::decode(&mut tx.as_slice()).unwrap()))
_public_db::Keys::take(txn, network)
}
}
@@ -226,13 +224,12 @@ impl SlashReports {
slash_report,
signature,
);
_public_db::SlashReports::set(txn, set.network, &(set.session, tx.encode()));
_public_db::SlashReports::set(txn, set.network, &(set.session, tx));
}
pub(crate) fn take(
txn: &mut impl DbTxn,
network: ExternalNetworkId,
) -> Option<(Session, Transaction)> {
let (session, tx) = _public_db::SlashReports::take(txn, network)?;
Some((session, <_>::decode(&mut tx.as_slice()).unwrap()))
_public_db::SlashReports::take(txn, network)
}
}