client/authority-discovery: Do not double encode signature (#5901)

Previously, when publishing ones address onto the DHT, the signature
signing those addresses would be SCALE encoded twice.

This commit removes the second encoding and adjusts the tests
to catch future regressions.
This commit is contained in:
Max Inden authored and GitHub committed 2020-05-06 10:52:44 +02:00
1 parent 3860999ea3
commit d40bf3cf36
3 files changed
+69 -66

No files matched your search

+3 -3
View File
@@ -120,7 +120,7 @@ pub trait BareCryptoStore: Send + Sync {
/// Given a list of public keys, find the first supported key and
/// sign the provided message with that key.
///
/// Returns a tuple of the used key and the signature
/// Returns a tuple of the used key and the SCALE encoded signature.
fn sign_with_any(
&self,
id: KeyTypeId,
@@ -144,8 +144,8 @@ pub trait BareCryptoStore: Send + Sync {
/// Provided a list of public keys, sign a message with
/// each key given that the key is supported.
///
/// Returns a list of `Result`s each representing the signature of each key or
/// a BareCryptoStoreError for non-supported keys.
/// Returns a list of `Result`s each representing the SCALE encoded
/// signature of each key or a BareCryptoStoreError for non-supported keys.
fn sign_with_all(
&self,
id: KeyTypeId,