mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Compact format for block number, nonce, balance (#910)
* Try to make everything compact * Make `Clone` work * Fix * Move contracts and balances over to compact encoding * Session and timestamp are compact * Sataking uses compact numbers * Treasury now compact * Compact Democracy * Council is compact * Fix
This commit is contained in:
@@ -284,7 +284,7 @@ impl_apis! {
|
||||
|
||||
fn inherent_extrinsics(data: InherentData) -> Vec<UncheckedExtrinsic> {
|
||||
let mut inherent = vec![generic::UncheckedMortalExtrinsic::new_unsigned(
|
||||
Call::Timestamp(TimestampCall::set(data.timestamp))
|
||||
Call::Timestamp(TimestampCall::set(data.timestamp.into()))
|
||||
)];
|
||||
|
||||
if !data.offline_indices.is_empty() {
|
||||
@@ -307,9 +307,9 @@ impl_apis! {
|
||||
(false, Call::Timestamp(TimestampCall::set(t))) => t,
|
||||
_ => return Err(BlockBuilderError::Generic("No valid timestamp inherent in block".into())),
|
||||
};
|
||||
|
||||
if *t > data.timestamp + MAX_TIMESTAMP_DRIFT {
|
||||
return Err(BlockBuilderError::TimestampInFuture(*t))
|
||||
let t = (*t).into();
|
||||
if t > data.timestamp + MAX_TIMESTAMP_DRIFT {
|
||||
return Err(BlockBuilderError::TimestampInFuture(t))
|
||||
}
|
||||
|
||||
// Offline indices
|
||||
|
||||
Reference in New Issue
Block a user