mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 05:17:58 +00:00
Fix benchmarks and add check so that they won't break again (#6061)
* fix benchmarks and add check * address review * fix line width
This commit is contained in:
@@ -297,9 +297,8 @@ impl BenchDb {
|
||||
&self.keyring,
|
||||
);
|
||||
|
||||
let version = client.runtime_version_at(&BlockId::number(0))
|
||||
.expect("There should be runtime version at 0")
|
||||
.spec_version;
|
||||
let runtime_version = client.runtime_version_at(&BlockId::number(0))
|
||||
.expect("There should be runtime version at 0");
|
||||
|
||||
let genesis_hash = client.block_hash(Zero::zero())
|
||||
.expect("Database error?")
|
||||
@@ -364,7 +363,8 @@ impl BenchDb {
|
||||
},
|
||||
},
|
||||
},
|
||||
version,
|
||||
runtime_version.spec_version,
|
||||
runtime_version.transaction_version,
|
||||
genesis_hash,
|
||||
);
|
||||
|
||||
@@ -462,10 +462,16 @@ impl BenchKeyring {
|
||||
}
|
||||
|
||||
/// Sign transaction with keypair from this keyring.
|
||||
pub fn sign(&self, xt: CheckedExtrinsic, version: u32, genesis_hash: [u8; 32]) -> UncheckedExtrinsic {
|
||||
pub fn sign(
|
||||
&self,
|
||||
xt: CheckedExtrinsic,
|
||||
spec_version: u32,
|
||||
tx_version: u32,
|
||||
genesis_hash: [u8; 32]
|
||||
) -> UncheckedExtrinsic {
|
||||
match xt.signed {
|
||||
Some((signed, extra)) => {
|
||||
let payload = (xt.function, extra.clone(), version, genesis_hash, genesis_hash);
|
||||
let payload = (xt.function, extra.clone(), spec_version, tx_version, genesis_hash, genesis_hash);
|
||||
let key = self.accounts.get(&signed).expect("Account id not found in keyring");
|
||||
let signature = payload.using_encoded(|b| {
|
||||
if b.len() > 256 {
|
||||
|
||||
Reference in New Issue
Block a user