mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 04:31:02 +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:
@@ -406,7 +406,7 @@ mod tests {
|
||||
|
||||
// Notify with a header and justification
|
||||
let justification = create_justification();
|
||||
let _ = justification_sender.notify(justification.clone()).unwrap();
|
||||
justification_sender.notify(|| Ok(justification.clone())).unwrap();
|
||||
|
||||
// Inspect what we received
|
||||
let recv = receiver.take(1).wait().flatten().collect::<Vec<_>>();
|
||||
@@ -418,7 +418,7 @@ mod tests {
|
||||
|
||||
let recv_sub_id: String =
|
||||
serde_json::from_value(json_map["subscription"].take()).unwrap();
|
||||
let recv_justification: Vec<u8> =
|
||||
let recv_justification: sp_core::Bytes =
|
||||
serde_json::from_value(json_map["result"].take()).unwrap();
|
||||
let recv_justification: GrandpaJustification<Block> =
|
||||
Decode::decode(&mut &recv_justification[..]).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user