mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
Extract unsigned tx from the SignParam structure (#1561)
* change sign_transaction method * clippy * rustup update && clippy * remove redudnant clone
This commit is contained in:
committed by
Bastian Köcher
parent
effe0f11c8
commit
f35b4f4897
@@ -183,7 +183,7 @@ impl Size for PreComputedSize {
|
||||
}
|
||||
|
||||
/// Era of specific transaction.
|
||||
#[derive(RuntimeDebug, Clone, Copy)]
|
||||
#[derive(RuntimeDebug, Clone, Copy, PartialEq)]
|
||||
pub enum TransactionEra<BlockNumber, BlockHash> {
|
||||
/// Transaction is immortal.
|
||||
Immortal,
|
||||
@@ -207,6 +207,14 @@ impl<BlockNumber: Copy + Into<u64>, BlockHash: Copy> TransactionEra<BlockNumber,
|
||||
TransactionEra::Immortal
|
||||
}
|
||||
|
||||
/// Returns mortality period if transaction is mortal.
|
||||
pub fn mortality_period(&self) -> Option<u32> {
|
||||
match *self {
|
||||
TransactionEra::Immortal => None,
|
||||
TransactionEra::Mortal(_, period) => Some(period),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns era that is used by FRAME-based runtimes.
|
||||
pub fn frame_era(&self) -> sp_runtime::generic::Era {
|
||||
match *self {
|
||||
|
||||
Reference in New Issue
Block a user