mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 02:08:02 +00:00
Adds support for returning a custom header from validate_block (#825)
* Adds support for returning a custom header from `validate_block` This adds support for returning a custom header from `validate_block`. Before this, we always returned the header of the block that was validated (and still do it by default). However, after this pr it is possible to set a custom header or better custom head data that will be returned instead from `validate_block`. This can be for example when a chain wants to fork. * FMT
This commit is contained in:
@@ -122,7 +122,7 @@ fn genesis_config() -> GenesisConfig {
|
||||
pub fn generate_extrinsic(
|
||||
client: &Client,
|
||||
origin: sp_keyring::AccountKeyring,
|
||||
function: Call,
|
||||
function: impl Into<Call>,
|
||||
) -> UncheckedExtrinsic {
|
||||
let current_block_hash = client.info().best_hash;
|
||||
let current_block = client.info().best_number.saturated_into();
|
||||
@@ -139,6 +139,9 @@ pub fn generate_extrinsic(
|
||||
frame_system::CheckWeight::<Runtime>::new(),
|
||||
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
|
||||
);
|
||||
|
||||
let function = function.into();
|
||||
|
||||
let raw_payload = SignedPayload::from_raw(
|
||||
function.clone(),
|
||||
extra.clone(),
|
||||
|
||||
Reference in New Issue
Block a user