Skip to content

Commit

Permalink
Implement the concat in twox_64_concat (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: Demi M. Obenour <demiobenour@gmail.com>
  • Loading branch information
Demi-Marie and DemiMarie authored Aug 10, 2020
1 parent 271775b commit 511e6f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}

Expand Down

0 comments on commit 511e6f5

Please sign in to comment.