Have a pass over metadata validation (#959)

* Have a pass over metadata validation

* trait metadata; fold instead of map+for

* remove a couple of other XORs, so all uses of it are now commented

* appease clippy
This commit is contained in:
James Wilson
2023-05-16 12:47:45 +01:00
committed by GitHub
parent 7f265dca49
commit 81494027c8
6 changed files with 363 additions and 392 deletions
+3 -1
View File
@@ -250,7 +250,9 @@ impl Metadata {
return hash;
}
let hash = subxt_metadata::get_metadata_per_pallet_hash(self.runtime_metadata(), pallets);
let hash = subxt_metadata::MetadataHasher::new()
.only_these_pallets(pallets)
.hash(self.runtime_metadata());
*self.inner.cached_metadata_hash.write() = Some(hash);
hash