mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Enforce that ProtocolId is a string (#6953)
* Enforce that ProtocolId is a string * Fix test
This commit is contained in:
@@ -419,7 +419,7 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> {
|
||||
|
||||
let transactions_protocol: Cow<'static, [u8]> = Cow::from({
|
||||
let mut proto = b"/".to_vec();
|
||||
proto.extend(protocol_id.as_bytes());
|
||||
proto.extend(protocol_id.as_ref().as_bytes());
|
||||
proto.extend(b"/transactions/1");
|
||||
proto
|
||||
});
|
||||
@@ -428,7 +428,7 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> {
|
||||
|
||||
let block_announces_protocol: Cow<'static, [u8]> = Cow::from({
|
||||
let mut proto = b"/".to_vec();
|
||||
proto.extend(protocol_id.as_bytes());
|
||||
proto.extend(protocol_id.as_ref().as_bytes());
|
||||
proto.extend(b"/block-announces/1");
|
||||
proto
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user