mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
grandpa: always create and send justification if there are any subscribers (#6935)
* grandpa: use bytes type for justification rpc notification * grandpa: always create justification if there are rpc subscribers * grandpa: wording * grandpa: replace notify_justification macro with function * grandpa: prefer Option<&T> over &Option<T>
This commit is contained in:
@@ -23,10 +23,10 @@ use sc_finality_grandpa::GrandpaJustification;
|
||||
|
||||
/// An encoded justification proving that the given header has been finalized
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct JustificationNotification(Vec<u8>);
|
||||
pub struct JustificationNotification(sp_core::Bytes);
|
||||
|
||||
impl<Block: BlockT> From<GrandpaJustification<Block>> for JustificationNotification {
|
||||
fn from(notification: GrandpaJustification<Block>) -> Self {
|
||||
JustificationNotification(notification.encode())
|
||||
JustificationNotification(notification.encode().into())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user