Bound Unsigned when signed is not supported. (#6367)

* bound unsigned when necessary

* convert more type to AtLeast32BitUnsigned

* Update primitives/arithmetic/src/traits.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* doc refactor

* line reorganize

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Guillaume Thiolliere
2020-06-25 11:30:20 +02:00
committed by GitHub
parent b17ccf24a8
commit 44fb311f1f
16 changed files with 84 additions and 74 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ use pallet_session::historical::IdentificationTuple;
use sp_runtime::{
offchain::storage::StorageValueRef,
RuntimeDebug,
traits::{Convert, Member, Saturating, AtLeast32Bit}, Perbill,
traits::{Convert, Member, Saturating, AtLeast32BitUnsigned}, Perbill,
transaction_validity::{
TransactionValidity, ValidTransaction, InvalidTransaction, TransactionSource,
TransactionPriority,
@@ -160,7 +160,7 @@ struct HeartbeatStatus<BlockNumber> {
pub sent_at: BlockNumber,
}
impl<BlockNumber: PartialEq + AtLeast32Bit + Copy> HeartbeatStatus<BlockNumber> {
impl<BlockNumber: PartialEq + AtLeast32BitUnsigned + Copy> HeartbeatStatus<BlockNumber> {
/// Returns true if heartbeat has been recently sent.
///
/// Parameters: