Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fixes and improvements for PoC-1 Testnet #143

Merged
merged 16 commits into from
May 7, 2018
Merged

Fixes and improvements for PoC-1 Testnet #143

merged 16 commits into from
May 7, 2018

Conversation

gavofyork
Copy link
Member

No description provided.

@gavofyork gavofyork added the A0-please_review Pull request needs code review. label May 2, 2018
@gavofyork gavofyork changed the title Fix initialisations and add a test. Fixes and improvements for PoC-1 Testnet May 5, 2018
/// Compare two fractions.
pub trait CompareRationals {
/// Return `true` iff `n1 / d1 < n2 / d2`. `d1` and `d2` may not be zero.
fn compare_rationals(n1: Self, d1: Self, n2: Self, d2: Self) -> bool;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not a free function?

}
// AUDIT: could be dangerous if no tail recursion optimisation as votes could be crafted
// to overflow the stack.
Self::compare_rationals(d2, r2, d1, r1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use a loop then? AFAIK Rust doesn't support TCO in many cases or perhaps at all and there have been no successful RFCs for guaranteed TCO, so it's better not to be at the mercy of the compiler.

@gavofyork gavofyork merged commit 0647b3b into master May 7, 2018
@gavofyork gavofyork deleted the gav-init-fixes branch May 7, 2018 13:25
lamafab pushed a commit to lamafab/substrate that referenced this pull request Jun 16, 2020
JoshOrndorff added a commit to moonbeam-foundation/substrate that referenced this pull request Apr 21, 2021
* Add clippy/rustfmt checks to CI

Add clippy check to CI

Apply uses correctly

Specify runs-on

Use checkout specified from check-prettier

Try specifying toolchain with clippy as components

Apply to correct action

Specify nightly without date

Use 'rustup component add clippy' instead of toolchain

Uses on steps

Typo

Specify rustfmt and clippy in rust-toolchain file

Try only rustfmt

Undo

Revert rust-toolchain file

Add --workspace arg to clippy

* rustup clippy in init.sh

* Introduce 'install toolchain' step for Clippy

* Add rustfmt check

Add rustfmt check

--

* Update .rustfmt.toml to remove license checking (for now)

* Enforce rustfmt rules on codebase

* Update Cargo.lock

* Resolve clippy complaints

* Apply rustfmt

* Appease clippy @ node/parachain/src/chain_spec.rs

Co-authored-by: Joshy Orndorff <[email protected]>

* Prefer unwrap_or_else to unwrap_or

* Avoid borrowed-box

* Add a pre-commit hook for rustfmt/clippy using rusty-hook

Co-authored-by: Joshy Orndorff <[email protected]>
Co-authored-by: Joshy Orndorff <[email protected]>
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* btcbridge CandidateTx and records withdraw cache

* Fix precision and initialization error

* Initialize balance of alice same with activation_per_share

* Tweak initial intention profile

* fix bug for withdraw in canonize, add no_withdrawal flag

* Can not unstake when still in frozen

* Fix some bug

* Tweak session_length and sessions_per_era

* Fix bug: Only candidate confirmed can create new proposal

* Fix unexpect deposit

* Tweak staking fees

* Fix bug: Add unexpect in Candidate to handle unexpect deposit

* Fix/match precision (paritytech#131)

* fix pending order precision

* add tests

* Update genesis_config

* Fix when candidate initialize

* Recover AccountMap to support btc register

* Update genesis BlockHeader

* Fix select utxo must balance > 0

* move best index set before deposit/withdraw in canonize

* Fix build error

* Modify > irr_block as >=

* Fix bug: Only candidate is not confirmed can modifi it status

* Fix btc transaction correlation

* Adjust PCX precision in session reward (paritytech#134)

* Fix/match precision (paritytech#132)

* fix pending order precision

* add tests

* add reserve last

* 1. Fix UTXOList bug (paritytech#136)

2. Update genesis_config irr_block from 0 to 2

* Remove String (paritytech#137)

* Reserve initial nomination (paritytech#138)

* Fix wasm build error

* Init nominees of initial intenions (paritytech#139)

* UTXO only store value > 0

* Init channel (paritytech#140)

* Init channel relationship

* Init genesis intention

* chance channel name (paritytech#141)

* fix fill fee (paritytech#142)

* Tweak parameters
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
liuchengxu added a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
* Separate out subspace-primitives from subspace-runtime

* Introduce `NewFull` struct in subspace-node

Also expose the `service` module in public.

* Make subspace-node a library
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
* Update to rc6.

* Update runtime.

* Update node to rc6.

* Update client.

* Fix node.

* Add option to enable telemetry.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants