mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 03:09:56 +00:00
additional tests for the pallet
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
@@ -488,7 +488,7 @@ pub mod pallet {
|
||||
|
||||
ValidTransaction::with_tag_prefix("SlowClap")
|
||||
.priority(T::UnsignedPriority::get())
|
||||
.and_provides(authority)
|
||||
.and_provides(signature)
|
||||
.longevity(LOCK_BLOCK_EXPIRATION)
|
||||
.propagate(true)
|
||||
.build()
|
||||
@@ -712,7 +712,7 @@ impl<T: Config> Pallet<T> {
|
||||
|
||||
Ok(match maybe_block_range {
|
||||
Some((from_block, to_block)) => match new_evm_block {
|
||||
0 => (to_block, new_evm_block),
|
||||
0 => (to_block, to_block),
|
||||
_ => (from_block, estimated_block),
|
||||
},
|
||||
None => (estimated_block, estimated_block),
|
||||
@@ -785,6 +785,7 @@ impl<T: Config> Pallet<T> {
|
||||
let signature = authority_key.sign(&clap.encode())
|
||||
.ok_or(OffchainErr::FailedSigning)?;
|
||||
let call = Call::slow_clap { clap, signature };
|
||||
|
||||
SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(call.into())
|
||||
.map_err(|_| OffchainErr::SubmitTransaction)?;
|
||||
}
|
||||
@@ -799,6 +800,7 @@ impl<T: Config> Pallet<T> {
|
||||
let authorities = Authorities::<T>::get(&session_index);
|
||||
let mut local_authorities = T::AuthorityId::all();
|
||||
local_authorities.sort();
|
||||
|
||||
authorities.into_iter().enumerate().filter_map(move |(index, authority)| {
|
||||
local_authorities
|
||||
.binary_search(&authority)
|
||||
|
||||
Reference in New Issue
Block a user