mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Do not try to synchronize from light client (#2039)
* do not try to sync from light node * use Roles' utility methods
This commit is contained in:
committed by
Gavin Wood
parent
5bde98e95a
commit
a29fd10859
@@ -73,6 +73,18 @@ bitflags! {
|
||||
}
|
||||
}
|
||||
|
||||
impl Roles {
|
||||
/// Does this role represents a client that holds full chain data locally?
|
||||
pub fn is_full(&self) -> bool {
|
||||
self.intersects(Roles::FULL | Roles::AUTHORITY)
|
||||
}
|
||||
|
||||
/// Does this role represents a client that does not hold full chain data locally?
|
||||
pub fn is_light(&self) -> bool {
|
||||
!self.is_full()
|
||||
}
|
||||
}
|
||||
|
||||
impl parity_codec::Encode for Roles {
|
||||
fn encode_to<T: parity_codec::Output>(&self, dest: &mut T) {
|
||||
dest.push_byte(self.bits())
|
||||
|
||||
Reference in New Issue
Block a user