mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
Rewrap all comments to 100 line width (#9490)
* reformat everything again * manual formatting * last manual fix * Fix build
This commit is contained in:
@@ -255,8 +255,8 @@ pub trait Ss58Codec: Sized + AsMut<[u8]> + AsRef<[u8]> + Default {
|
||||
let (prefix_len, ident) = match data[0] {
|
||||
0..=63 => (1, data[0] as u16),
|
||||
64..=127 => {
|
||||
// weird bit manipulation owing to the combination of LE encoding and missing two bits
|
||||
// from the left.
|
||||
// weird bit manipulation owing to the combination of LE encoding and missing two
|
||||
// bits from the left.
|
||||
// d[0] d[1] are: 01aaaaaa bbcccccc
|
||||
// they make the LE-encoded 16-bit value: aaaaaabb 00cccccc
|
||||
// so the lower byte is formed of aaaaaabb and the higher byte is 00cccccc
|
||||
@@ -1029,9 +1029,9 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
|
||||
/// Get the public key.
|
||||
fn public(&self) -> Self::Public;
|
||||
|
||||
/// Interprets the string `s` in order to generate a key Pair. Returns both the pair and an optional seed, in the
|
||||
/// case that the pair can be expressed as a direct derivation from a seed (some cases, such as Sr25519 derivations
|
||||
/// with path components, cannot).
|
||||
/// Interprets the string `s` in order to generate a key Pair. Returns both the pair and an
|
||||
/// optional seed, in the case that the pair can be expressed as a direct derivation from a seed
|
||||
/// (some cases, such as Sr25519 derivations with path components, cannot).
|
||||
///
|
||||
/// This takes a helper function to do the key generation from a phrase, password and
|
||||
/// junction iterator.
|
||||
@@ -1043,7 +1043,8 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
|
||||
/// - the phrase may be followed by one or more items delimited by `/` characters.
|
||||
/// - the path may be followed by `///`, in which case everything after the `///` is treated
|
||||
/// as a password.
|
||||
/// - If `s` begins with a `/` character it is prefixed with the Substrate public `DEV_PHRASE` and
|
||||
/// - If `s` begins with a `/` character it is prefixed with the Substrate public `DEV_PHRASE`
|
||||
/// and
|
||||
/// interpreted as above.
|
||||
///
|
||||
/// In this case they are interpreted as HDKD junctions; purely numeric items are interpreted as
|
||||
@@ -1053,8 +1054,8 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
|
||||
/// There is no correspondence mapping between SURI strings and the keys they represent.
|
||||
/// Two different non-identical strings can actually lead to the same secret being derived.
|
||||
/// Notably, integer junction indices may be legally prefixed with arbitrary number of zeros.
|
||||
/// Similarly an empty password (ending the SURI with `///`) is perfectly valid and will generally
|
||||
/// be equivalent to no password at all.
|
||||
/// Similarly an empty password (ending the SURI with `///`) is perfectly valid and will
|
||||
/// generally be equivalent to no password at all.
|
||||
///
|
||||
/// `None` is returned if no matches are found.
|
||||
#[cfg(feature = "std")]
|
||||
|
||||
@@ -118,7 +118,8 @@ impl ExecutionContext {
|
||||
|
||||
match self {
|
||||
Importing | Syncing | BlockConstruction => offchain::Capabilities::none(),
|
||||
// Enable keystore, transaction pool and Offchain DB reads by default for offchain calls.
|
||||
// Enable keystore, transaction pool and Offchain DB reads by default for offchain
|
||||
// calls.
|
||||
OffchainCall(None) => [
|
||||
offchain::Capability::Keystore,
|
||||
offchain::Capability::OffchainDbRead,
|
||||
|
||||
@@ -344,8 +344,8 @@ pub trait Externalities: Send {
|
||||
|
||||
/// Initiates a http request given HTTP verb and the URL.
|
||||
///
|
||||
/// Meta is a future-reserved field containing additional, parity-scale-codec encoded parameters.
|
||||
/// Returns the id of newly started request.
|
||||
/// Meta is a future-reserved field containing additional, parity-scale-codec encoded
|
||||
/// parameters. Returns the id of newly started request.
|
||||
///
|
||||
/// Returns an error if:
|
||||
/// - No new request identifier could be allocated.
|
||||
@@ -388,8 +388,8 @@ pub trait Externalities: Send {
|
||||
/// - The request identifier is invalid.
|
||||
/// - `http_response_wait` has already been called on this request.
|
||||
/// - The deadline is reached.
|
||||
/// - An I/O error has happened, for example the remote has closed our
|
||||
/// request. The request is then considered invalid.
|
||||
/// - An I/O error has happened, for example the remote has closed our request. The request is
|
||||
/// then considered invalid.
|
||||
fn http_request_write_body(
|
||||
&mut self,
|
||||
request_id: HttpRequestId,
|
||||
@@ -440,8 +440,8 @@ pub trait Externalities: Send {
|
||||
/// Returns an error if:
|
||||
/// - The request identifier is invalid.
|
||||
/// - The deadline is reached.
|
||||
/// - An I/O error has happened, for example the remote has closed our
|
||||
/// request. The request is then considered invalid.
|
||||
/// - An I/O error has happened, for example the remote has closed our request. The request is
|
||||
/// then considered invalid.
|
||||
fn http_response_read_body(
|
||||
&mut self,
|
||||
request_id: HttpRequestId,
|
||||
|
||||
@@ -168,8 +168,8 @@ impl OffchainState {
|
||||
/// Add expected HTTP request.
|
||||
///
|
||||
/// This method can be used to initialize expected HTTP requests and their responses
|
||||
/// before running the actual code that utilizes them (for instance before calling into runtime).
|
||||
/// Expected request has to be fulfilled before this struct is dropped,
|
||||
/// before running the actual code that utilizes them (for instance before calling into
|
||||
/// runtime). Expected request has to be fulfilled before this struct is dropped,
|
||||
/// the `response` and `response_headers` fields will be used to return results to the callers.
|
||||
/// Requests are expected to be performed in the insertion order.
|
||||
pub fn expect_request(&mut self, expected: PendingRequest) {
|
||||
|
||||
@@ -870,7 +870,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn verify_from_old_wasm_works() {
|
||||
// The values in this test case are compared to the output of `node-test.js` in schnorrkel-js.
|
||||
// The values in this test case are compared to the output of `node-test.js` in
|
||||
// schnorrkel-js.
|
||||
//
|
||||
// This is to make sure that the wasm library is compatible.
|
||||
let pk = Pair::from_seed(&hex!(
|
||||
|
||||
@@ -126,13 +126,13 @@ pub trait ReadRuntimeVersion: Send + Sync {
|
||||
/// The version information may be embedded into the wasm binary itself. If it is not present,
|
||||
/// then this function may fallback to the legacy way of reading the version.
|
||||
///
|
||||
/// The legacy mechanism involves instantiating the passed wasm runtime and calling `Core_version`
|
||||
/// on it. This is a very expensive operation.
|
||||
/// The legacy mechanism involves instantiating the passed wasm runtime and calling
|
||||
/// `Core_version` on it. This is a very expensive operation.
|
||||
///
|
||||
/// `ext` is only needed in case the calling into runtime happens. Otherwise it is ignored.
|
||||
///
|
||||
/// Compressed wasm blobs are supported and will be decompressed if needed. If uncompression fails,
|
||||
/// the error is returned.
|
||||
/// Compressed wasm blobs are supported and will be decompressed if needed. If uncompression
|
||||
/// fails, the error is returned.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user