Enforce that ProtocolId is a string (#6953)

* Enforce that ProtocolId is a string

* Fix test
This commit is contained in:
Pierre Krieger
2020-08-26 14:27:30 +02:00
committed by GitHub
parent 8856be80bc
commit 1bd6082cf7
14 changed files with 61 additions and 57 deletions
@@ -129,7 +129,7 @@ impl Config {
pub fn set_protocol(&mut self, id: &ProtocolId) -> &mut Self {
let mut v = Vec::new();
v.extend_from_slice(b"/");
v.extend_from_slice(id.as_bytes());
v.extend_from_slice(id.as_ref().as_bytes());
v.extend_from_slice(b"/finality-proof/1");
self.protocol = v.into();
self