mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
Support sending and receiving multiple Justifications (#8266)
* client/network: support sending multiple justifications * network: flag support for multiple justifications in protobuf request * Update client/network/src/protocol.rs Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> * network: update comment on protobuf field Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
@@ -580,6 +580,11 @@ impl<B: BlockT> Protocol<B> {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
justifications: if !block_data.justifications.is_empty() {
|
||||
Some(DecodeAll::decode_all(&mut block_data.justifications.as_ref())?)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
})
|
||||
}).collect::<Result<Vec<_>, codec::Error>>();
|
||||
|
||||
@@ -908,6 +913,7 @@ impl<B: BlockT> Protocol<B> {
|
||||
receipt: None,
|
||||
message_queue: None,
|
||||
justification: None,
|
||||
justifications: None,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -1123,6 +1129,7 @@ fn prepare_block_request<B: BlockT>(
|
||||
to_block: request.to.map(|h| h.encode()).unwrap_or_default(),
|
||||
direction: request.direction as i32,
|
||||
max_blocks: request.max.unwrap_or(0),
|
||||
support_multiple_justifications: true,
|
||||
};
|
||||
|
||||
CustomMessageOutcome::BlockRequest {
|
||||
|
||||
Reference in New Issue
Block a user