Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
acab9a3
Block builder (substrate)
gavofyork Feb 12, 2018
9acd3f9
Fix wasm build
gavofyork Feb 12, 2018
ca5900f
Bulid on any block
gavofyork Feb 13, 2018
d11cfe1
Test for block builder.
gavofyork Feb 13, 2018
b973ccc
Block import tests for client.
gavofyork Feb 13, 2018
ec61865
Tidy ups
gavofyork Feb 13, 2018
cec06a7
Repotted client
gavofyork Feb 13, 2018
38cd36a
Avoid pointless work
gavofyork Feb 13, 2018
8b7abca
All backend stuff now manages optional storage.
gavofyork Feb 13, 2018
9dba812
Native runtime-io now supports empty storage items.
gavofyork Feb 13, 2018
0f591c6
Finish up the API transition.
gavofyork Feb 14, 2018
79c6b4c
Merge branch 'master' into gav-optional-storage
gavofyork Feb 15, 2018
a802b7e
Build fix.
gavofyork Feb 15, 2018
3928c1c
Fix tests.
gavofyork Feb 15, 2018
002ab5f
Merge branch 'master' into gav-optional-storage
gavofyork Feb 16, 2018
61db63f
Remerge in changes to client.
gavofyork Feb 16, 2018
5d1a3a7
Final fixes.
gavofyork Feb 16, 2018
212d370
Unrevert typos
gavofyork Feb 17, 2018
780e549
Remove accidentally committed change
gavofyork Feb 18, 2018
e552875
Bring back zero copy
gavofyork Feb 18, 2018
0a08196
Fix merge.
gavofyork Feb 18, 2018
e25960b
Refactor out some duped code
gavofyork Feb 19, 2018
9042880
Merge branch 'master' into gav-demo
gavofyork Feb 20, 2018
af3a413
Add docs.
gavofyork Feb 20, 2018
2b13856
More mssing doc.
gavofyork Feb 20, 2018
08060a6
Fix up wasm build.
gavofyork Feb 20, 2018
036142c
Introduce substrate-demo
gavofyork Feb 20, 2018
38bf4d7
Remove bad files.
gavofyork Feb 20, 2018
a2fb006
Tidy up unneeded code.
gavofyork Feb 20, 2018
775cb5a
Add needed file.
gavofyork Feb 20, 2018
0b83481
Initial staging ground for interior wasm smart-contracts.
gavofyork Feb 20, 2018
3413d14
More work on Ext & calls.
gavofyork Feb 22, 2018
0a82fd2
Fix logic
gavofyork Feb 23, 2018
b098eb2
comment
gavofyork Feb 23, 2018
73c4141
Remove unneeded call depth.
gavofyork Feb 25, 2018
9ef9c01
Use BTreeMap rather than HashMap in demo runtime.
gavofyork Feb 25, 2018
59c371f
Initial draft of stakeholder democracy.
gavofyork Feb 25, 2018
696f22a
Tests for referenda.
gavofyork Feb 26, 2018
98b74bc
Design of the approval voting module for council election.
gavofyork Feb 27, 2018
87bc061
Implement next_tally.
gavofyork Feb 28, 2018
f5ad966
More work on governance.
gavofyork Feb 28, 2018
afcff76
Submit candidacy.
gavofyork Mar 1, 2018
264384d
presenting a winner.
gavofyork Mar 1, 2018
822a5dc
Final bit of core logic for the council.
gavofyork Mar 1, 2018
9a1d638
remove inactive voter.
gavofyork Mar 1, 2018
4618367
Space out votes by a minimum period.
gavofyork Mar 1, 2018
9af17a5
Candidacy tests
gavofyork Mar 2, 2018
511775c
More candidate tests.
gavofyork Mar 2, 2018
2eeb88e
More tests for voting.
gavofyork Mar 2, 2018
5ea3f2b
Test for tally
gavofyork Mar 2, 2018
bcb2b39
More tests, for runners-up.
gavofyork Mar 2, 2018
3541d4e
test: second tally uses runners-up.
gavofyork Mar 2, 2018
a0c405f
Tests: various error cases with present.
gavofyork Mar 2, 2018
899e26e
tests: presenting losers
gavofyork Mar 2, 2018
4777806
cleanups.
gavofyork Mar 2, 2018
f0d5f53
Merge branch 'master' into gav-demo
gavofyork Mar 2, 2018
f276b4d
tests: Retract inactive voter
gavofyork Mar 2, 2018
05b6a8d
Additional docs & test.
gavofyork Mar 2, 2018
2bf2799
Add one vote worth of time for voters to unregister before they becom…
gavofyork Mar 2, 2018
999c082
Avoid allowing same accounts to be doubly-elected.
gavofyork Mar 2, 2018
0c9265f
test: against double presentations.
gavofyork Mar 2, 2018
3c911cd
Update docs
gavofyork Mar 2, 2018
002ddab
Simultaneous referendums and multiple voting variants.
gavofyork Mar 3, 2018
b8cc3a1
Introduce logic for deposits.
gavofyork Mar 3, 2018
9aeb95c
Deposits, not fees.
gavofyork Mar 3, 2018
fffbadd
cleanups.
gavofyork Mar 3, 2018
6dfe148
Introduce minimum deposit
gavofyork Mar 3, 2018
907fac7
Tests for public referenda.
gavofyork Mar 4, 2018
0bbd6b3
Tests for public referenda.
gavofyork Mar 4, 2018
8df2342
remove string constants <-- @rphmeier
gavofyork Mar 4, 2018
c73e3f9
Ensure council always sorted by expiry.
gavofyork Mar 4, 2018
0bb5791
Initial council vote logic.
gavofyork Mar 4, 2018
f780504
More tests for council voting.
gavofyork Mar 5, 2018
25b8c20
council vetoing & tests.
gavofyork Mar 5, 2018
7ef0b17
Another few tests for council_vote.
gavofyork Mar 5, 2018
8b37acf
Final tests.
gavofyork Mar 6, 2018
bb7f398
Move council over to new Keyring API.
gavofyork Mar 6, 2018
8be2cc8
Move democracy module over no new Keyring API
gavofyork Mar 6, 2018
7e6e40d
Introduce stake reservation; make panicking tests better.
gavofyork Mar 6, 2018
7e8e404
Genesis map.
gavofyork Mar 7, 2018
2d66a63
Use a struct!
gavofyork Mar 7, 2018
22d4829
Tests for staking reserved balances & slashing.
gavofyork Mar 10, 2018
5450807
Public function dispatching.
gavofyork Mar 10, 2018
e09096c
Safe panic.
gavofyork Mar 10, 2018
128fa23
Fix tests and avoid use of old keys.
gavofyork Mar 10, 2018
d347030
Fix grumbles.
gavofyork Mar 11, 2018
b6897d5
Minor typos.
gavofyork Mar 11, 2018
6029553
Cleanups and introduce all dispatchable endpoints.
gavofyork Mar 12, 2018
f3439c9
Additional function ids for derivation.
gavofyork Mar 12, 2018
23b030a
Formatting.
gavofyork Mar 12, 2018
016a7b6
Remove stray printlns.
gavofyork Mar 14, 2018
0f81021
Merge branch 'master' into gav-demo
gavofyork Mar 14, 2018
5c9a40a
Update wasm.
gavofyork Mar 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanups.
  • Loading branch information
gavofyork committed Mar 2, 2018
commit 47778068fe020ffbdffddd8536c7c2d358127dcb
19 changes: 9 additions & 10 deletions demo/runtime/src/runtime/council.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ pub mod public {
})
.sum();
let dupe = leaderboard.iter().find(|&&(_, ref c)| c == candidate).is_some();
println!("-> {}", actual_total);
if total == actual_total && !dupe {
// insert into leaderboard
leaderboard[0] = (total, candidate.clone());
Expand Down Expand Up @@ -569,14 +568,14 @@ mod tests {
twox_128(b"sta:vac").to_vec() => vec![].and(&3u64),
twox_128(b"sta:era").to_vec() => vec![].and(&1u64),

twox_128(b"cou:cbo").to_vec() => vec![].and(&9u64), // CANDIDACY_BOND
twox_128(b"cou:vbo").to_vec() => vec![].and(&3u64), // VOTING_BOND
twox_128(b"cou:pss").to_vec() => vec![].and(&1u64), // PRESENT_SLASH_PER_VOTER
twox_128(b"cou:cco").to_vec() => vec![].and(&2u64), // CARRY_COUNT
twox_128(b"cou:pdu").to_vec() => vec![].and(&2u64), // PRESENTATION_DURATION
twox_128(b"cou:per").to_vec() => vec![].and(&4u64), // VOTING_PERIOD
twox_128(b"cou:trm").to_vec() => vec![].and(&5u64), // TERM_DURATION
twox_128(b"cou:sts").to_vec() => vec![].and(&2u64) // DESIRED_SEATS
twox_128(CANDIDACY_BOND).to_vec() => vec![].and(&9u64),
twox_128(VOTING_BOND).to_vec() => vec![].and(&3u64),
twox_128(PRESENT_SLASH_PER_VOTER).to_vec() => vec![].and(&1u64),
twox_128(CARRY_COUNT).to_vec() => vec![].and(&2u64),
twox_128(PRESENTATION_DURATION).to_vec() => vec![].and(&2u64),
twox_128(VOTING_PERIOD).to_vec() => vec![].and(&4u64),
twox_128(TERM_DURATION).to_vec() => vec![].and(&5u64),
twox_128(DESIRED_SEATS).to_vec() => vec![].and(&2u64)
]
}

Expand Down Expand Up @@ -1014,7 +1013,7 @@ mod tests {
public::present(&dave, &charlie, 18, 0);
public::present(&dave, &dave, 28, 0);
public::present(&dave, &eve, 38, 0);

assert_eq!(leaderboard(), Some(vec![
(18, charlie.clone()),
(28, dave.clone()),
Expand Down