Implement the concat in twox_64_concat

This commit is contained in:
Demi M. Obenour
2020-08-07 21:44:51 -04:00
parent 6bf960f55f
commit 528b218ef2
+7 -1
View File
@@ -274,7 +274,13 @@ impl StorageMetadata {
StorageHasher::Blake2_256 => sp_core::blake2_256(bytes).to_vec(),
StorageHasher::Twox128 => sp_core::twox_128(bytes).to_vec(),
StorageHasher::Twox256 => sp_core::twox_256(bytes).to_vec(),
StorageHasher::Twox64Concat => sp_core::twox_64(bytes).to_vec(),
StorageHasher::Twox64Concat => {
sp_core::twox_64(bytes)
.iter()
.chain(bytes)
.cloned()
.collect()
}
}
}